import {
    c as e,
    h as t,
    i as l,
    d as a,
    e as n,
    f as o,
    g as r,
    C as s,
    u as i,
    F as u,
    j as d
} from "./useForm.9355f9ab1729265196717.js";
import {
    W as c,
    X as p,
    Y as h,
    Z as f,
    _ as v,
    $ as m,
    a0 as g,
    a1 as b,
    a2 as y,
    a3 as w,
    a4 as x,
    a5 as C,
    a6 as S,
    a7 as k,
    a8 as E,
    a9 as N,
    aa as R,
    ab as O,
    ac as P,
    ad as A,
    ae as L,
    af as F,
    ag as M,
    ah as W,
    ai as T,
    aj as z,
    ak as H,
    al as j,
    am as $,
    an as _,
    d as I,
    ao as B,
    K as D,
    o as K,
    c as V,
    t as q,
    h as Y,
    i as X,
    ap as U,
    a as G,
    aq as Q,
    ar as Z,
    as as J,
    at as ee,
    au as te,
    av as le,
    aw as ae,
    r as ne,
    w as oe,
    k as re,
    H as se,
    ax as ie,
    p as ue,
    j as de,
    ay as ce,
    s as pe,
    az as he,
    aA as fe,
    aB as ve,
    aC as me,
    aD as ge,
    aE as be,
    aF as ye,
    aG as we,
    aH as xe,
    aI as Ce,
    J as Se,
    aJ as ke,
    aK as Ee,
    aL as Ne,
    aM as Re,
    aN as Oe,
    aO as Pe,
    aP as Ae,
    P as Le,
    I as Fe,
    aQ as Me,
    S as We,
    aR as Te,
    aS as ze,
    F as He,
    G as je,
    l as $e,
    B as _e,
    aT as Ie,
    aU as Be,
    aV as De,
    aW as Ke,
    aX as Ve,
    aY as qe,
    aZ as Ye,
    a_ as Xe,
    a$ as Ue,
    b0 as Ge,
    b1 as Qe,
    b2 as Ze,
    R as Je,
    U as et,
    C as tt,
    b3 as lt,
    b4 as at,
    b5 as nt,
    b6 as ot,
    b7 as rt,
    b8 as st,
    D as it,
    m as ut,
    b9 as dt,
    ba as ct,
    V as pt,
    bb as ht,
    g as ft,
    E as vt,
    bc as mt,
    bd as gt
} from "./index.115af62d1729265196717.js";
import {u as bt, E as yt} from "./el-button.c1876bd01729265196717.js";
import {b as wt, e as xt, t as Ct, f as St} from "./tree.67a6f3e21729265196717.js";
import {u as kt, y as Et, a as Nt} from "./el-divider.111259cd1729265196717.js";
import {E as Rt, b as Ot} from "./index.eec34c841729265196717.js";

var Pt = 1, At = 2;

function Lt(e) {
    return e == e && !c(e)
}

function Ft(e, t) {
    return function (l) {
        return null != l && (l[e] === t && (void 0 !== t || e in Object(l)))
    }
}

function Mt(t) {
    var l = function (e) {
        for (var t = g(e), l = t.length; l--;) {
            var a = t[l], n = e[a];
            t[l] = [a, n, Lt(n)]
        }
        return t
    }(t);
    return 1 == l.length && l[0][2] ? Ft(l[0][0], l[0][1]) : function (a) {
        return a === t || function (t, l, a, n) {
            var o = a.length, r = o, s = !n;
            if (null == t) return !r;
            for (t = Object(t); o--;) {
                var i = a[o];
                if (s && i[2] ? i[1] !== t[i[0]] : !(i[0] in t)) return !1
            }
            for (; ++o < r;) {
                var u = (i = a[o])[0], d = t[u], c = i[1];
                if (s && i[2]) {
                    if (void 0 === d && !(u in t)) return !1
                } else {
                    var p = new m;
                    if (n) var h = n(d, c, u, t, l, p);
                    if (!(void 0 === h ? e(c, d, Pt | At, n, p) : h)) return !1
                }
            }
            return !0
        }(a, t, l)
    }
}

var Wt, Tt = 1, zt = 2;

function Ht(e) {
    return b(e) ? (t = y(e), function (e) {
        return null == e ? void 0 : e[t]
    }) : function (e) {
        return function (t) {
            return x(t, e)
        }
    }(e);
    var t
}

function jt(l) {
    return "function" == typeof l ? l : null == l ? C : "object" == typeof l ? S(l) ? (a = l[0], n = l[1], b(a) && Lt(n) ? Ft(y(a), n) : function (l) {
        var o = w(l, a);
        return void 0 === o && o === n ? t(l, a) : e(n, o, Tt | zt)
    }) : Mt(l) : Ht(l);
    var a, n
}

const $t = function (e, t, l) {
    for (var a = -1, n = Object(e), o = l(e), r = o.length; r--;) {
        var s = o[Wt ? r : ++a];
        if (!1 === t(n[s], s, n)) break
    }
    return e
};
var _t = function (e, t) {
    return function (l, a) {
        if (null == l) return l;
        if (!p(l)) return e(l, a);
        for (var n = l.length, o = t ? n : -1, r = Object(l); (t ? o-- : ++o < n) && !1 !== a(r[o], o, r);) ;
        return l
    }
}((function (e, t) {
    return e && $t(e, t, g)
}));
const It = _t;

function Bt(e, t, l) {
    (void 0 !== l && !f(e[t], l) || void 0 === l && !(t in e)) && k(e, t, l)
}

function Dt(e, t) {
    if (("constructor" !== t || "function" != typeof e[t]) && "__proto__" != t) return e[t]
}

function Kt(e, t, l, a, n, o, r) {
    var s = Dt(e, l), i = Dt(t, l), u = r.get(i);
    if (u) Bt(e, l, u); else {
        var d, p = o ? o(s, i, l + "", e, t, r) : void 0, h = void 0 === p;
        if (h) {
            var f = S(i), v = !f && R(i), m = !f && !v && O(i);
            p = i, f || v || m ? S(s) ? p = s : P(s) ? p = A(s) : v ? (h = !1, p = L(i, !0)) : m ? (h = !1, p = F(i, !0)) : p = [] : M(i) || W(i) ? (p = s, W(s) ? p = E(d = s, N(d)) : c(s) && !T(s) || (p = z(i))) : h = !1
        }
        h && (r.set(i, p), n(p, i, a, o, r), r.delete(i)), Bt(e, l, p)
    }
}

function Vt(e, t, l, a, n) {
    e !== t && $t(t, (function (o, r) {
        if (n || (n = new m), c(o)) Kt(e, t, r, l, Vt, a, n); else {
            var s = a ? a(Dt(e, r), o, r + "", e, t, n) : void 0;
            void 0 === s && (s = o), Bt(e, r, s)
        }
    }), N)
}

function qt(e, t) {
    var l = -1, a = p(e) ? Array(e.length) : [];
    return It(e, (function (e, n, o) {
        a[++l] = t(e, n, o)
    })), a
}

function Yt(e, t) {
    return j(function (e, t) {
        return (S(e) ? H : qt)(e, jt(t))
    }(e, t), 1)
}

var Xt;
const Ut = (Xt = function (e, t, l) {
    Vt(e, t, l)
}, v((function (e, t) {
    var l = -1, a = t.length, n = a > 1 ? t[a - 1] : void 0, o = a > 2 ? t[2] : void 0;
    for (n = Xt.length > 3 && "function" == typeof n ? (a--, n) : void 0, o && function (e, t, l) {
        if (!c(l)) return !1;
        var a = typeof t;
        return !!("number" == a ? p(l) && h(t, l.length) : "string" == a && t in l) && f(l[t], e)
    }(t[0], t[1], o) && (n = a < 3 ? void 0 : n, a = 1), e = Object(e); ++l < a;) {
        var r = t[l];
        r && Xt(e, r, l, n)
    }
    return e
})));
var Gt, Qt, Zt, Jt, el, tl, ll, al, nl, ol, rl, sl, il, ul, dl, cl = !1;

function pl() {
    if (!cl) {
        cl = !0;
        var e = navigator.userAgent,
            t = /(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),
            l = /(Mac OS X)|(Windows)|(Linux)/.exec(e);
        if (sl = /\b(iPhone|iP[ao]d)/.exec(e), il = /\b(iP[ao]d)/.exec(e), ol = /Android/i.exec(e), ul = /FBAN\/\w+;/i.exec(e), dl = /Mobile/i.exec(e), rl = !!/Win64/.exec(e), t) {
            (Gt = t[1] ? parseFloat(t[1]) : t[5] ? parseFloat(t[5]) : NaN) && document && document.documentMode && (Gt = document.documentMode);
            var a = /(?:Trident\/(\d+.\d+))/.exec(e);
            tl = a ? parseFloat(a[1]) + 4 : Gt, Qt = t[2] ? parseFloat(t[2]) : NaN, Zt = t[3] ? parseFloat(t[3]) : NaN, (Jt = t[4] ? parseFloat(t[4]) : NaN) ? (t = /(?:Chrome\/(\d+\.\d+))/.exec(e), el = t && t[1] ? parseFloat(t[1]) : NaN) : el = NaN
        } else Gt = Qt = Zt = el = Jt = NaN;
        if (l) {
            if (l[1]) {
                var n = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);
                ll = !n || parseFloat(n[1].replace("_", "."))
            } else ll = !1;
            al = !!l[2], nl = !!l[3]
        } else ll = al = nl = !1
    }
}

var hl, fl = {
    ie: function () {
        return pl() || Gt
    }, ieCompatibilityMode: function () {
        return pl() || tl > Gt
    }, ie64: function () {
        return fl.ie() && rl
    }, firefox: function () {
        return pl() || Qt
    }, opera: function () {
        return pl() || Zt
    }, webkit: function () {
        return pl() || Jt
    }, safari: function () {
        return fl.webkit()
    }, chrome: function () {
        return pl() || el
    }, windows: function () {
        return pl() || al
    }, osx: function () {
        return pl() || ll
    }, linux: function () {
        return pl() || nl
    }, iphone: function () {
        return pl() || sl
    }, mobile: function () {
        return pl() || sl || il || ol || dl
    }, nativeApp: function () {
        return pl() || ul
    }, android: function () {
        return pl() || ol
    }, ipad: function () {
        return pl() || il
    }
}, vl = fl, ml = !!(typeof window < "u" && window.document && window.document.createElement), gl = {
    canUseDOM: ml,
    canUseWorkers: typeof Worker < "u",
    canUseEventListeners: ml && !(!window.addEventListener && !window.attachEvent),
    canUseViewport: ml && !!window.screen,
    isInWorker: !ml
};
gl.canUseDOM && (hl = document.implementation && document.implementation.hasFeature && !0 !== document.implementation.hasFeature("", ""));
var bl = function (e, t) {
    if (!gl.canUseDOM || t && !("addEventListener" in document)) return !1;
    var l = "on" + e, a = l in document;
    if (!a) {
        var n = document.createElement("div");
        n.setAttribute(l, "return;"), a = "function" == typeof n[l]
    }
    return !a && hl && "wheel" === e && (a = document.implementation.hasFeature("Events.wheel", "3.0")), a
};

function yl(e) {
    var t = 0, l = 0, a = 0, n = 0;
    return "detail" in e && (l = e.detail), "wheelDelta" in e && (l = -e.wheelDelta / 120), "wheelDeltaY" in e && (l = -e.wheelDeltaY / 120), "wheelDeltaX" in e && (t = -e.wheelDeltaX / 120), "axis" in e && e.axis === e.HORIZONTAL_AXIS && (t = l, l = 0), a = 10 * t, n = 10 * l, "deltaY" in e && (n = e.deltaY), "deltaX" in e && (a = e.deltaX), (a || n) && e.deltaMode && (1 == e.deltaMode ? (a *= 40, n *= 40) : (a *= 800, n *= 800)), a && !t && (t = a < 1 ? -1 : 1), n && !l && (l = n < 1 ? -1 : 1), {
        spinX: t,
        spinY: l,
        pixelX: a,
        pixelY: n
    }
}

yl.getEventType = function () {
    return vl.firefox() ? "DOMMouseScroll" : bl("wheel") ? "wheel" : "mousewheel"
};
var wl = yl;
/**
 * Checks if an event is supported in the current execution environment.
 *
 * NOTE: This will not work correctly for non-generic events such as `change`,
 * `reset`, `load`, `error`, and `select`.
 *
 * Borrows from Modernizr.
 *
 * @param {string} eventNameSuffix Event name, e.g. "click".
 * @param {?boolean} capture Check if the capture phase is supported.
 * @return {boolean} True if the event is supported.
 * @internal
 * @license Modernizr 3.0.0pre (Custom Build) | MIT
 */const xl = {
        beforeMount(e, t) {
            !function (e, t) {
                if (e && e.addEventListener) {
                    const l = function (e) {
                        const l = wl(e);
                        t && Reflect.apply(t, this, [e, l])
                    };
                    e.addEventListener("wheel", l, {passive: !0})
                }
            }(e, t.value)
        }
    }, Cl = Symbol("elPaginationKey"),
    Sl = $({disabled: Boolean, currentPage: {type: Number, default: 1}, prevText: {type: String}, prevIcon: {type: _}}),
    kl = {click: e => e instanceof MouseEvent}, El = ["disabled", "aria-label", "aria-disabled"], Nl = {key: 0},
    Rl = I({name: "ElPaginationPrev"});
var Ol = Z(I({
    ...Rl, props: Sl, emits: kl, setup(e) {
        const t = e, {t: l} = B(), a = D((() => t.disabled || t.currentPage <= 1));
        return (e, t) => (K(), V("button", {
            type: "button",
            class: "btn-prev",
            disabled: G(a),
            "aria-label": e.prevText || G(l)("el.pagination.prev"),
            "aria-disabled": G(a),
            onClick: t[0] || (t[0] = t => e.$emit("click", t))
        }, [e.prevText ? (K(), V("span", Nl, q(e.prevText), 1)) : (K(), Y(G(Q), {key: 1}, {
            default: X((() => [(K(), Y(U(e.prevIcon)))])),
            _: 1
        }))], 8, El))
    }
}), [["__file", "/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/prev.vue"]]);
const Pl = $({
    disabled: Boolean,
    currentPage: {type: Number, default: 1},
    pageCount: {type: Number, default: 50},
    nextText: {type: String},
    nextIcon: {type: _}
}), Al = ["disabled", "aria-label", "aria-disabled"], Ll = {key: 0}, Fl = I({name: "ElPaginationNext"});
var Ml = Z(I({
    ...Fl, props: Pl, emits: ["click"], setup(e) {
        const t = e, {t: l} = B(), a = D((() => t.disabled || t.currentPage === t.pageCount || 0 === t.pageCount));
        return (e, t) => (K(), V("button", {
            type: "button",
            class: "btn-next",
            disabled: G(a),
            "aria-label": e.nextText || G(l)("el.pagination.next"),
            "aria-disabled": G(a),
            onClick: t[0] || (t[0] = t => e.$emit("click", t))
        }, [e.nextText ? (K(), V("span", Ll, q(e.nextText), 1)) : (K(), Y(G(Q), {key: 1}, {
            default: X((() => [(K(), Y(U(e.nextIcon)))])),
            _: 1
        }))], 8, Al))
    }
}), [["__file", "/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/next.vue"]]);
const Wl = () => J(Cl, {}), Tl = $({
    pageSize: {type: Number, required: !0},
    pageSizes: {type: ee(Array), default: () => te([10, 20, 30, 40, 50, 100])},
    popperClass: {type: String},
    disabled: Boolean,
    size: {type: String, values: le}
}), zl = I({name: "ElPaginationSizes"});
var Hl = Z(I({
    ...zl, props: Tl, emits: ["page-size-change"], setup(e, {emit: t}) {
        const o = e, {t: r} = B(), s = ae("pagination"), i = Wl(), u = ne(o.pageSize);
        oe((() => o.pageSizes), ((e, a) => {
            if (!l(e, a) && Array.isArray(e)) {
                const l = e.includes(o.pageSize) ? o.pageSize : o.pageSizes[0];
                t("page-size-change", l)
            }
        })), oe((() => o.pageSize), (e => {
            u.value = e
        }));
        const d = D((() => o.pageSizes));

        function c(e) {
            var t;
            e !== u.value && (u.value = e, null == (t = i.handleSizeChange) || t.call(i, Number(e)))
        }

        return (e, t) => (K(), V("span", {class: ue(G(s).e("sizes"))}, [re(G(n), {
            "model-value": u.value,
            disabled: e.disabled,
            "popper-class": e.popperClass,
            size: e.size,
            "validate-event": !1,
            onChange: c
        }, {
            default: X((() => [(K(!0), V(se, null, ie(G(d), (e => (K(), Y(G(a), {
                key: e,
                value: e,
                label: e + G(r)("el.pagination.pagesize")
            }, null, 8, ["value", "label"])))), 128))])), _: 1
        }, 8, ["model-value", "disabled", "popper-class", "size"])], 2))
    }
}), [["__file", "/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/sizes.vue"]]);
const jl = $({size: {type: String, values: le}}), $l = ["disabled"], _l = I({name: "ElPaginationJumper"});
var Il = Z(I({
    ..._l, props: jl, setup(e) {
        const {t: t} = B(), l = ae("pagination"), {pageCount: a, disabled: n, currentPage: o, changeEvent: r} = Wl(),
            s = ne(), i = D((() => {
                var e;
                return null != (e = s.value) ? e : null == o ? void 0 : o.value
            }));

        function u(e) {
            s.value = e ? +e : ""
        }

        function d(e) {
            e = Math.trunc(+e), null == r || r(e), s.value = void 0
        }

        return (e, o) => (K(), V("span", {
            class: ue(G(l).e("jump")),
            disabled: G(n)
        }, [de("span", {class: ue([G(l).e("goto")])}, q(G(t)("el.pagination.goto")), 3), re(G(Rt), {
            size: e.size,
            class: ue([G(l).e("editor"), G(l).is("in-pagination")]),
            min: 1,
            max: G(a),
            disabled: G(n),
            "model-value": G(i),
            "validate-event": !1,
            label: G(t)("el.pagination.page"),
            type: "number",
            "onUpdate:modelValue": u,
            onChange: d
        }, null, 8, ["size", "class", "max", "disabled", "model-value", "label"]), de("span", {class: ue([G(l).e("classifier")])}, q(G(t)("el.pagination.pageClassifier")), 3)], 10, $l))
    }
}), [["__file", "/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/jumper.vue"]]);
const Bl = $({total: {type: Number, default: 1e3}}), Dl = ["disabled"], Kl = I({name: "ElPaginationTotal"});
var Vl = Z(I({
    ...Kl, props: Bl, setup(e) {
        const {t: t} = B(), l = ae("pagination"), {disabled: a} = Wl();
        return (e, n) => (K(), V("span", {
            class: ue(G(l).e("total")),
            disabled: G(a)
        }, q(G(t)("el.pagination.total", {total: e.total})), 11, Dl))
    }
}), [["__file", "/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/total.vue"]]);
const ql = $({
        currentPage: {type: Number, default: 1},
        pageCount: {type: Number, required: !0},
        pagerCount: {type: Number, default: 7},
        disabled: Boolean
    }), Yl = ["onKeyup"], Xl = ["aria-current", "aria-label", "tabindex"], Ul = ["tabindex", "aria-label"],
    Gl = ["aria-current", "aria-label", "tabindex"], Ql = ["tabindex", "aria-label"],
    Zl = ["aria-current", "aria-label", "tabindex"], Jl = I({name: "ElPaginationPager"});
var ea = Z(I({
    ...Jl, props: ql, emits: ["change"], setup(e, {emit: t}) {
        const l = e, a = ae("pager"), n = ae("icon"), {t: o} = B(), r = ne(!1), s = ne(!1), i = ne(!1), u = ne(!1),
            d = ne(!1), c = ne(!1), p = D((() => {
                const e = l.pagerCount, t = (e - 1) / 2, a = Number(l.currentPage), n = Number(l.pageCount);
                let o = !1, r = !1;
                n > e && (a > e - t && (o = !0), a < n - t && (r = !0));
                const s = [];
                if (o && !r) {
                    for (let t = n - (e - 2); t < n; t++) s.push(t)
                } else if (!o && r) for (let l = 2; l < e; l++) s.push(l); else if (o && r) {
                    const t = Math.floor(e / 2) - 1;
                    for (let e = a - t; e <= a + t; e++) s.push(e)
                } else for (let l = 2; l < n; l++) s.push(l);
                return s
            })), h = D((() => l.disabled ? -1 : 0));

        function f(e = !1) {
            l.disabled || (e ? i.value = !0 : u.value = !0)
        }

        function v(e = !1) {
            e ? d.value = !0 : c.value = !0
        }

        function m(e) {
            const a = e.target;
            if ("li" === a.tagName.toLowerCase() && Array.from(a.classList).includes("number")) {
                const e = Number(a.textContent);
                e !== l.currentPage && t("change", e)
            } else "li" === a.tagName.toLowerCase() && Array.from(a.classList).includes("more") && g(e)
        }

        function g(e) {
            const a = e.target;
            if ("ul" === a.tagName.toLowerCase() || l.disabled) return;
            let n = Number(a.textContent);
            const o = l.pageCount, r = l.currentPage, s = l.pagerCount - 2;
            a.className.includes("more") && (a.className.includes("quickprev") ? n = r - s : a.className.includes("quicknext") && (n = r + s)), Number.isNaN(+n) || (n < 1 && (n = 1), n > o && (n = o)), n !== r && t("change", n)
        }

        return ce((() => {
            const e = (l.pagerCount - 1) / 2;
            r.value = !1, s.value = !1, l.pageCount > l.pagerCount && (l.currentPage > l.pagerCount - e && (r.value = !0), l.currentPage < l.pageCount - e && (s.value = !0))
        })), (e, t) => (K(), V("ul", {
            class: ue(G(a).b()),
            onClick: g,
            onKeyup: me(m, ["enter"])
        }, [e.pageCount > 0 ? (K(), V("li", {
            key: 0,
            class: ue([[G(a).is("active", 1 === e.currentPage), G(a).is("disabled", e.disabled)], "number"]),
            "aria-current": 1 === e.currentPage,
            "aria-label": G(o)("el.pagination.currentPage", {pager: 1}),
            tabindex: G(h)
        }, " 1 ", 10, Xl)) : pe("v-if", !0), r.value ? (K(), V("li", {
            key: 1,
            class: ue(["more", "btn-quickprev", G(n).b(), G(a).is("disabled", e.disabled)]),
            tabindex: G(h),
            "aria-label": G(o)("el.pagination.prevPages", {pager: e.pagerCount - 2}),
            onMouseenter: t[0] || (t[0] = e => f(!0)),
            onMouseleave: t[1] || (t[1] = e => i.value = !1),
            onFocus: t[2] || (t[2] = e => v(!0)),
            onBlur: t[3] || (t[3] = e => d.value = !1)
        }, [!i.value && !d.value || e.disabled ? (K(), Y(G(fe), {key: 1})) : (K(), Y(G(he), {key: 0}))], 42, Ul)) : pe("v-if", !0), (K(!0), V(se, null, ie(G(p), (t => (K(), V("li", {
            key: t,
            class: ue([[G(a).is("active", e.currentPage === t), G(a).is("disabled", e.disabled)], "number"]),
            "aria-current": e.currentPage === t,
            "aria-label": G(o)("el.pagination.currentPage", {pager: t}),
            tabindex: G(h)
        }, q(t), 11, Gl)))), 128)), s.value ? (K(), V("li", {
            key: 2,
            class: ue(["more", "btn-quicknext", G(n).b(), G(a).is("disabled", e.disabled)]),
            tabindex: G(h),
            "aria-label": G(o)("el.pagination.nextPages", {pager: e.pagerCount - 2}),
            onMouseenter: t[4] || (t[4] = e => f()),
            onMouseleave: t[5] || (t[5] = e => u.value = !1),
            onFocus: t[6] || (t[6] = e => v()),
            onBlur: t[7] || (t[7] = e => c.value = !1)
        }, [!u.value && !c.value || e.disabled ? (K(), Y(G(fe), {key: 1})) : (K(), Y(G(ve), {key: 0}))], 42, Ql)) : pe("v-if", !0), e.pageCount > 1 ? (K(), V("li", {
            key: 3,
            class: ue([[G(a).is("active", e.currentPage === e.pageCount), G(a).is("disabled", e.disabled)], "number"]),
            "aria-current": e.currentPage === e.pageCount,
            "aria-label": G(o)("el.pagination.currentPage", {pager: e.pageCount}),
            tabindex: G(h)
        }, q(e.pageCount), 11, Zl)) : pe("v-if", !0)], 42, Yl))
    }
}), [["__file", "/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/pager.vue"]]);
const ta = e => "number" != typeof e, la = $({
    total: Number,
    pageSize: Number,
    defaultPageSize: Number,
    currentPage: Number,
    defaultCurrentPage: Number,
    pageCount: Number,
    pagerCount: {
        type: Number,
        validator: e => ge(e) && Math.trunc(e) === e && e > 4 && e < 22 && e % 2 == 1,
        default: 7
    },
    layout: {type: String, default: ["prev", "pager", "next", "jumper", "->", "total"].join(", ")},
    pageSizes: {type: ee(Array), default: () => te([10, 20, 30, 40, 50, 100])},
    popperClass: {type: String, default: ""},
    prevText: {type: String, default: ""},
    prevIcon: {type: _, default: () => be},
    nextText: {type: String, default: ""},
    nextIcon: {type: _, default: () => ye},
    small: Boolean,
    background: Boolean,
    disabled: Boolean,
    hideOnSinglePage: Boolean
}), aa = "ElPagination";
const na = ke(I({
    name: aa,
    props: la,
    emits: {
        "update:current-page": e => ge(e),
        "update:page-size": e => ge(e),
        "size-change": e => ge(e),
        "current-change": e => ge(e),
        "prev-click": e => ge(e),
        "next-click": e => ge(e)
    },
    setup(e, {emit: t, slots: l}) {
        const {t: a} = B(), n = ae("pagination"), o = we().vnode.props || {},
            r = "onUpdate:currentPage" in o || "onUpdate:current-page" in o || "onCurrentChange" in o,
            s = "onUpdate:pageSize" in o || "onUpdate:page-size" in o || "onSizeChange" in o, i = D((() => {
                if (ta(e.total) && ta(e.pageCount)) return !1;
                if (!ta(e.currentPage) && !r) return !1;
                if (e.layout.includes("sizes")) if (ta(e.pageCount)) {
                    if (!ta(e.total) && !ta(e.pageSize) && !s) return !1
                } else if (!s) return !1;
                return !0
            })), u = ne(ta(e.defaultPageSize) ? 10 : e.defaultPageSize),
            d = ne(ta(e.defaultCurrentPage) ? 1 : e.defaultCurrentPage), c = D({
                get: () => ta(e.pageSize) ? u.value : e.pageSize, set(l) {
                    ta(e.pageSize) && (u.value = l), s && (t("update:page-size", l), t("size-change", l))
                }
            }), p = D((() => {
                let t = 0;
                return ta(e.pageCount) ? ta(e.total) || (t = Math.max(1, Math.ceil(e.total / c.value))) : t = e.pageCount, t
            })), h = D({
                get: () => ta(e.currentPage) ? d.value : e.currentPage, set(l) {
                    let a = l;
                    l < 1 ? a = 1 : l > p.value && (a = p.value), ta(e.currentPage) && (d.value = a), r && (t("update:current-page", a), t("current-change", a))
                }
            });

        function f(e) {
            h.value = e
        }

        function v() {
            e.disabled || (h.value -= 1, t("prev-click", h.value))
        }

        function m() {
            e.disabled || (h.value += 1, t("next-click", h.value))
        }

        function g(e, t) {
            e && (e.props || (e.props = {}), e.props.class = [e.props.class, t].join(" "))
        }

        return oe(p, (e => {
            h.value > e && (h.value = e)
        })), xe(Cl, {
            pageCount: p,
            disabled: D((() => e.disabled)),
            currentPage: h,
            changeEvent: f,
            handleSizeChange: function (e) {
                c.value = e;
                const t = p.value;
                h.value > t && (h.value = t)
            }
        }), () => {
            var t, o;
            if (!i.value) return Ce(aa, a("el.pagination.deprecationWarning")), null;
            if (!e.layout) return null;
            if (e.hideOnSinglePage && p.value <= 1) return null;
            const r = [], s = [], u = Se("div", {class: n.e("rightwrapper")}, s), d = {
                prev: Se(Ol, {
                    disabled: e.disabled,
                    currentPage: h.value,
                    prevText: e.prevText,
                    prevIcon: e.prevIcon,
                    onClick: v
                }),
                jumper: Se(Il, {size: e.small ? "small" : "default"}),
                pager: Se(ea, {
                    currentPage: h.value,
                    pageCount: p.value,
                    pagerCount: e.pagerCount,
                    onChange: f,
                    disabled: e.disabled
                }),
                next: Se(Ml, {
                    disabled: e.disabled,
                    currentPage: h.value,
                    pageCount: p.value,
                    nextText: e.nextText,
                    nextIcon: e.nextIcon,
                    onClick: m
                }),
                sizes: Se(Hl, {
                    pageSize: c.value,
                    pageSizes: e.pageSizes,
                    popperClass: e.popperClass,
                    disabled: e.disabled,
                    size: e.small ? "small" : "default"
                }),
                slot: null != (o = null == (t = null == l ? void 0 : l.default) ? void 0 : t.call(l)) ? o : null,
                total: Se(Vl, {total: ta(e.total) ? 0 : e.total})
            }, b = e.layout.split(",").map((e => e.trim()));
            let y = !1;
            return b.forEach((e => {
                "->" !== e ? y ? s.push(d[e]) : r.push(d[e]) : y = !0
            })), g(r[0], n.is("first")), g(r[r.length - 1], n.is("last")), y && s.length > 0 && (g(s[0], n.is("first")), g(s[s.length - 1], n.is("last")), r.push(u)), Se("div", {class: [n.b(), n.is("background", e.background), {[n.m("small")]: e.small}]}, r)
        }
    }
}));
/*!
 * escape-html
 * Copyright(c) 2012-2013 TJ Holowaychuk
 * Copyright(c) 2015 Andreas Lubbe
 * Copyright(c) 2015 Tiancheng "Timothy" Gu
 * MIT Licensed
 */
var oa = /["'&<>]/, ra = function (e) {
    var t, l = "" + e, a = oa.exec(l);
    if (!a) return l;
    var n = "", o = 0, r = 0;
    for (o = a.index; o < l.length; o++) {
        switch (l.charCodeAt(o)) {
            case 34:
                t = "&quot;";
                break;
            case 38:
                t = "&amp;";
                break;
            case 39:
                t = "&#39;";
                break;
            case 60:
                t = "&lt;";
                break;
            case 62:
                t = "&gt;";
                break;
            default:
                continue
        }
        r !== o && (n += l.substring(r, o)), r = o + 1, n += t
    }
    return r !== o ? n + l.substring(r, o) : n
};
const sa = function (e) {
    var t;
    return null == (t = e.target) ? void 0 : t.closest("td")
}, ia = function (e, t, l, a, n) {
    if (!t && !a && (!n || Array.isArray(n) && !n.length)) return e;
    l = "string" == typeof l ? "descending" === l ? -1 : 1 : l && l < 0 ? -1 : 1;
    const o = a ? null : function (l, a) {
        return n ? (Array.isArray(n) || (n = [n]), n.map((t => "string" == typeof t ? w(l, t) : t(l, a, e)))) : ("$key" !== t && Pe(l) && "$value" in l && (l = l.$value), [Pe(l) ? w(l, t) : l])
    };
    return e.map(((e, t) => ({value: e, index: t, key: o ? o(e, t) : null}))).sort(((e, t) => {
        let n = function (e, t) {
            if (a) return a(e.value, t.value);
            for (let l = 0, a = e.key.length; l < a; l++) {
                if (e.key[l] < t.key[l]) return -1;
                if (e.key[l] > t.key[l]) return 1
            }
            return 0
        }(e, t);
        return n || (n = e.index - t.index), n * +l
    })).map((e => e.value))
}, ua = function (e, t) {
    let l = null;
    return e.columns.forEach((e => {
        e.id === t && (l = e)
    })), l
}, da = function (e, t) {
    let l = null;
    for (let a = 0; a < e.columns.length; a++) {
        const n = e.columns[a];
        if (n.columnKey === t) {
            l = n;
            break
        }
    }
    return l || Ne("ElTable", `No column matching with column-key: ${t}`), l
}, ca = function (e, t, l) {
    const a = (t.className || "").match(new RegExp(`${l}-table_[^\\s]+`, "gm"));
    return a ? ua(e, a[0]) : null
}, pa = (e, t) => {
    if (!e) throw new Error("Row is required when get row identity");
    if ("string" == typeof t) {
        if (!t.includes(".")) return `${e[t]}`;
        const l = t.split(".");
        let a = e;
        for (const e of l) a = a[e];
        return `${a}`
    }
    if ("function" == typeof t) return t.call(null, e)
}, ha = function (e, t) {
    const l = {};
    return (e || []).forEach(((e, a) => {
        l[pa(e, t)] = {row: e, index: a}
    })), l
};

function fa(e) {
    return "" === e || void 0 !== e && (e = Number.parseInt(e, 10), Number.isNaN(e) && (e = "")), e
}

function va(e) {
    return "" === e || void 0 !== e && (e = fa(e), Number.isNaN(e) && (e = 80)), e
}

function ma(e, t, l) {
    let a = !1;
    const n = e.indexOf(t), o = -1 !== n, r = r => {
        "add" === r ? e.push(t) : e.splice(n, 1), a = !0, Oe(t.children) && t.children.forEach((t => {
            ma(e, t, null != l ? l : !o)
        }))
    };
    return Re(l) ? l && !o ? r("add") : !l && o && r("remove") : r(o ? "remove" : "add"), a
}

function ga(e, t, l = "children", a = "hasChildren") {
    const n = e => !(Array.isArray(e) && e.length);

    function o(e, r, s) {
        t(e, r, s), r.forEach((e => {
            if (e[a]) return void t(e, null, s + 1);
            const r = e[l];
            n(r) || o(e, r, s + 1)
        }))
    }

    e.forEach((e => {
        if (e[a]) return void t(e, null, 0);
        const r = e[l];
        n(r) || o(e, r, 0)
    }))
}

let ba;

function ya(e) {
    return e.children ? Yt(e.children, ya) : [e]
}

function wa(e, t) {
    return e + t.colSpan
}

const xa = (e, t, l, a) => {
    let n = 0, o = e;
    const r = l.states.columns.value;
    if (a) {
        const t = ya(a[e]);
        n = r.slice(0, r.indexOf(t[0])).reduce(wa, 0), o = n + t.reduce(wa, 0) - 1
    } else n = e;
    let s;
    switch (t) {
        case"left":
            o < l.states.fixedLeafColumnsLength.value && (s = "left");
            break;
        case"right":
            n >= r.length - l.states.rightFixedLeafColumnsLength.value && (s = "right");
            break;
        default:
            o < l.states.fixedLeafColumnsLength.value ? s = "left" : n >= r.length - l.states.rightFixedLeafColumnsLength.value && (s = "right")
    }
    return s ? {direction: s, start: n, after: o} : {}
}, Ca = (e, t, l, a, n, o = 0) => {
    const r = [], {direction: s, start: i, after: u} = xa(t, l, a, n);
    if (s) {
        const t = "left" === s;
        r.push(`${e}-fixed-column--${s}`), t && u + o === a.states.fixedLeafColumnsLength.value - 1 ? r.push("is-last-column") : t || i - o != a.states.columns.value.length - a.states.rightFixedLeafColumnsLength.value || r.push("is-first-column")
    }
    return r
};

function Sa(e, t) {
    return e + (null === t.realWidth || Number.isNaN(t.realWidth) ? Number(t.width) : t.realWidth)
}

const ka = (e, t, l, a) => {
    const {direction: n, start: o = 0, after: r = 0} = xa(e, t, l, a);
    if (!n) return;
    const s = {}, i = "left" === n, u = l.states.columns.value;
    return i ? s.left = u.slice(0, o).reduce(Sa, 0) : s.right = u.slice(r + 1).reverse().reduce(Sa, 0), s
}, Ea = (e, t) => {
    e && (Number.isNaN(e[t]) || (e[t] = `${e[t]}px`))
};
const Na = (e, t) => {
    const l = t.sortingColumn;
    return l && "string" != typeof l.sortable ? ia(e, t.sortProp, t.sortOrder, l.sortMethod, l.sortBy) : e
}, Ra = e => {
    const t = [];
    return e.forEach((e => {
        e.children ? t.push.apply(t, Ra(e.children)) : t.push(e)
    })), t
};

function Oa() {
    var e;
    const t = we(), {size: l} = Ae(null == (e = t.proxy) ? void 0 : e.$props), a = ne(null), n = ne([]), o = ne([]),
        r = ne(!1), s = ne([]), i = ne([]), u = ne([]), d = ne([]), c = ne([]), p = ne([]), h = ne([]), f = ne([]),
        v = ne(0), m = ne(0), g = ne(0), b = ne(!1), y = ne([]), w = ne(!1), x = ne(!1), C = ne(null), S = ne({}),
        k = ne(null), E = ne(null), N = ne(null), R = ne(null), O = ne(null);
    oe(n, (() => t.state && L(!1)), {deep: !0});
    const P = e => {
        var t;
        null == (t = e.children) || t.forEach((t => {
            t.fixed = e.fixed, P(t)
        }))
    }, A = () => {
        s.value.forEach((e => {
            P(e)
        })), d.value = s.value.filter((e => !0 === e.fixed || "left" === e.fixed)), c.value = s.value.filter((e => "right" === e.fixed)), d.value.length > 0 && s.value[0] && "selection" === s.value[0].type && !s.value[0].fixed && (s.value[0].fixed = !0, d.value.unshift(s.value[0]));
        const e = s.value.filter((e => !e.fixed));
        i.value = [].concat(d.value).concat(e).concat(c.value);
        const t = Ra(e), l = Ra(d.value), a = Ra(c.value);
        v.value = t.length, m.value = l.length, g.value = a.length, u.value = [].concat(l).concat(t).concat(a), r.value = d.value.length > 0 || c.value.length > 0
    }, L = (e, l = !1) => {
        e && A(), l ? t.state.doLayout() : t.state.debouncedUpdateLayout()
    }, F = e => {
        var l;
        if (!t || !t.store) return 0;
        const {treeData: a} = t.store.states;
        let n = 0;
        const o = null == (l = a.value[e]) ? void 0 : l.children;
        return o && (n += o.length, o.forEach((e => {
            n += F(e)
        }))), n
    }, M = (e, t, l) => {
        E.value && E.value !== e && (E.value.order = null), E.value = e, N.value = t, R.value = l
    }, W = () => {
        let e = G(o);
        Object.keys(S.value).forEach((t => {
            const l = S.value[t];
            if (!l || 0 === l.length) return;
            const a = ua({columns: u.value}, t);
            a && a.filterMethod && (e = e.filter((e => l.some((t => a.filterMethod.call(null, t, e, a))))))
        })), k.value = e
    }, T = () => {
        n.value = Na(k.value, {sortingColumn: E.value, sortProp: N.value, sortOrder: R.value})
    }, {setExpandRowKeys: z, toggleRowExpansion: H, updateExpandRows: j, states: $, isRowExpanded: _} = function (e) {
        const t = we(), l = ne(!1), a = ne([]);
        return {
            updateExpandRows: () => {
                const t = e.data.value || [], n = e.rowKey.value;
                if (l.value) a.value = t.slice(); else if (n) {
                    const e = ha(a.value, n);
                    a.value = t.reduce(((t, l) => {
                        const a = pa(l, n);
                        return e[a] && t.push(l), t
                    }), [])
                } else a.value = []
            }, toggleRowExpansion: (e, l) => {
                ma(a.value, e, l) && t.emit("expand-change", e, a.value.slice())
            }, setExpandRowKeys: l => {
                t.store.assertRowKey();
                const n = e.data.value || [], o = e.rowKey.value, r = ha(n, o);
                a.value = l.reduce(((e, t) => {
                    const l = r[t];
                    return l && e.push(l.row), e
                }), [])
            }, isRowExpanded: t => {
                const l = e.rowKey.value;
                return l ? !!ha(a.value, l)[pa(t, l)] : a.value.includes(t)
            }, states: {expandRows: a, defaultExpandAll: l}
        }
    }({data: n, rowKey: a}), {
        updateTreeExpandKeys: I,
        toggleTreeExpansion: B,
        updateTreeData: K,
        loadOrToggle: V,
        states: q
    } = function (e) {
        const t = ne([]), l = ne({}), a = ne(16), n = ne(!1), o = ne({}), r = ne("hasChildren"), s = ne("children"),
            i = we(), u = D((() => {
                if (!e.rowKey.value) return {};
                const t = e.data.value || [];
                return c(t)
            })), d = D((() => {
                const t = e.rowKey.value, l = Object.keys(o.value), a = {};
                return l.length ? (l.forEach((e => {
                    if (o.value[e].length) {
                        const l = {children: []};
                        o.value[e].forEach((e => {
                            const n = pa(e, t);
                            l.children.push(n), e[r.value] && !a[n] && (a[n] = {children: []})
                        })), a[e] = l
                    }
                })), a) : a
            })), c = t => {
                const l = e.rowKey.value, a = {};
                return ga(t, ((e, t, o) => {
                    const r = pa(e, l);
                    Array.isArray(t) ? a[r] = {
                        children: t.map((e => pa(e, l))),
                        level: o
                    } : n.value && (a[r] = {children: [], lazy: !0, level: o})
                }), s.value, r.value), a
            }, p = (e = !1, a = (e => null == (e = i.store) ? void 0 : e.states.defaultExpandAll.value)()) => {
                var o;
                const r = u.value, s = d.value, c = Object.keys(r), p = {};
                if (c.length) {
                    const o = G(l), i = [], u = (l, n) => {
                        if (e) return t.value ? a || t.value.includes(n) : !(!a && !(null == l ? void 0 : l.expanded));
                        {
                            const e = a || t.value && t.value.includes(n);
                            return !(!(null == l ? void 0 : l.expanded) && !e)
                        }
                    };
                    c.forEach((e => {
                        const t = o[e], l = {...r[e]};
                        if (l.expanded = u(t, e), l.lazy) {
                            const {loaded: a = !1, loading: n = !1} = t || {};
                            l.loaded = !!a, l.loading = !!n, i.push(e)
                        }
                        p[e] = l
                    }));
                    const d = Object.keys(s);
                    n.value && d.length && i.length && d.forEach((e => {
                        const t = o[e], l = s[e].children;
                        if (i.includes(e)) {
                            if (0 !== p[e].children.length) throw new Error("[ElTable]children must be an empty array.");
                            p[e].children = l
                        } else {
                            const {loaded: a = !1, loading: n = !1} = t || {};
                            p[e] = {lazy: !0, loaded: !!a, loading: !!n, expanded: u(t, e), children: l, level: ""}
                        }
                    }))
                }
                l.value = p, null == (o = i.store) || o.updateTableScrollY()
            };
        oe((() => t.value), (() => {
            p(!0)
        })), oe((() => u.value), (() => {
            p()
        })), oe((() => d.value), (() => {
            p()
        }));
        const h = (t, a) => {
            i.store.assertRowKey();
            const n = e.rowKey.value, o = pa(t, n), r = o && l.value[o];
            if (o && r && "expanded" in r) {
                const e = r.expanded;
                a = void 0 === a ? !r.expanded : a, l.value[o].expanded = a, e !== a && i.emit("expand-change", t, a), i.store.updateTableScrollY()
            }
        }, f = (e, t, a) => {
            const {load: n} = i.props;
            n && !l.value[t].loaded && (l.value[t].loading = !0, n(e, a, (a => {
                if (!Array.isArray(a)) throw new TypeError("[ElTable] data must be an array");
                l.value[t].loading = !1, l.value[t].loaded = !0, l.value[t].expanded = !0, a.length && (o.value[t] = a), i.emit("expand-change", e, !0)
            })))
        };
        return {
            loadData: f,
            loadOrToggle: t => {
                i.store.assertRowKey();
                const a = e.rowKey.value, o = pa(t, a), r = l.value[o];
                n.value && r && "loaded" in r && !r.loaded ? f(t, o, r) : h(t, void 0)
            },
            toggleTreeExpansion: h,
            updateTreeExpandKeys: e => {
                t.value = e, p()
            },
            updateTreeData: p,
            normalize: c,
            states: {
                expandRowKeys: t,
                treeData: l,
                indent: a,
                lazy: n,
                lazyTreeNodeMap: o,
                lazyColumnIdentifier: r,
                childrenColumnName: s
            }
        }
    }({data: n, rowKey: a}), {
        updateCurrentRowData: Y,
        updateCurrentRow: X,
        setCurrentRowKey: U,
        states: Q
    } = function (e) {
        const t = we(), l = ne(null), a = ne(null), n = () => {
            l.value = null
        }, o = l => {
            const {data: n, rowKey: o} = e;
            let r = null;
            o.value && (r = (G(n) || []).find((e => pa(e, o.value) === l))), a.value = r, t.emit("current-change", a.value, null)
        };
        return {
            setCurrentRowKey: e => {
                t.store.assertRowKey(), l.value = e, o(e)
            }, restoreCurrentRowKey: n, setCurrentRowByKey: o, updateCurrentRow: e => {
                const l = a.value;
                if (e && e !== l) return a.value = e, void t.emit("current-change", a.value, l);
                !e && l && (a.value = null, t.emit("current-change", null, l))
            }, updateCurrentRowData: () => {
                const r = e.rowKey.value, s = e.data.value || [], i = a.value;
                if (!s.includes(i) && i) {
                    if (r) {
                        const e = pa(i, r);
                        o(e)
                    } else a.value = null;
                    null === a.value && t.emit("current-change", null, i)
                } else l.value && (o(l.value), n())
            }, states: {_currentRowKey: l, currentRow: a}
        }
    }({data: n, rowKey: a});
    return {
        assertRowKey: () => {
            if (!a.value) throw new Error("[ElTable] prop row-key is required")
        },
        updateColumns: A,
        scheduleLayout: L,
        isSelected: e => y.value.includes(e),
        clearSelection: () => {
            b.value = !1;
            y.value.length && (y.value = [], t.emit("selection-change", []))
        },
        cleanSelection: () => {
            let e;
            if (a.value) {
                e = [];
                const t = ha(y.value, a.value), l = ha(n.value, a.value);
                for (const a in t) Ee(t, a) && !l[a] && e.push(t[a].row)
            } else e = y.value.filter((e => !n.value.includes(e)));
            if (e.length) {
                const l = y.value.filter((t => !e.includes(t)));
                y.value = l, t.emit("selection-change", l.slice())
            }
        },
        getSelectionRows: () => (y.value || []).slice(),
        toggleRowSelection: (e, l = undefined, a = !0) => {
            if (ma(y.value, e, l)) {
                const l = (y.value || []).slice();
                a && t.emit("select", l, e), t.emit("selection-change", l)
            }
        },
        _toggleAllSelection: () => {
            var e, l;
            const a = x.value ? !b.value : !(b.value || y.value.length);
            b.value = a;
            let o = !1, r = 0;
            const s = null == (l = null == (e = null == t ? void 0 : t.store) ? void 0 : e.states) ? void 0 : l.rowKey.value;
            n.value.forEach(((e, t) => {
                const l = t + r;
                C.value ? C.value.call(null, e, l) && ma(y.value, e, a) && (o = !0) : ma(y.value, e, a) && (o = !0), r += F(pa(e, s))
            })), o && t.emit("selection-change", y.value ? y.value.slice() : []), t.emit("select-all", y.value)
        },
        toggleAllSelection: null,
        updateSelectionByRowKey: () => {
            const e = ha(y.value, a.value);
            n.value.forEach((t => {
                const l = pa(t, a.value), n = e[l];
                n && (y.value[n.index] = t)
            }))
        },
        updateAllSelected: () => {
            var e, l, o;
            if (0 === (null == (e = n.value) ? void 0 : e.length)) return void (b.value = !1);
            let r;
            a.value && (r = ha(y.value, a.value));
            let s = !0, i = 0, u = 0;
            for (let c = 0, p = (n.value || []).length; c < p; c++) {
                const e = null == (o = null == (l = null == t ? void 0 : t.store) ? void 0 : l.states) ? void 0 : o.rowKey.value,
                    p = c + u, h = n.value[c], f = C.value && C.value.call(null, h, p);
                if (d = h, r ? r[pa(d, a.value)] : y.value.includes(d)) i++; else if (!C.value || f) {
                    s = !1;
                    break
                }
                u += F(pa(h, e))
            }
            var d;
            0 === i && (s = !1), b.value = s
        },
        updateFilters: (e, t) => {
            Array.isArray(e) || (e = [e]);
            const l = {};
            return e.forEach((e => {
                S.value[e.id] = t, l[e.columnKey || e.id] = t
            })), l
        },
        updateCurrentRow: X,
        updateSort: M,
        execFilter: W,
        execSort: T,
        execQuery: (e = undefined) => {
            e && e.filter || W(), T()
        },
        clearFilter: e => {
            const {tableHeaderRef: l} = t.refs;
            if (!l) return;
            const a = Object.assign({}, l.filterPanels), n = Object.keys(a);
            if (n.length) if ("string" == typeof e && (e = [e]), Array.isArray(e)) {
                const l = e.map((e => da({columns: u.value}, e)));
                n.forEach((e => {
                    const t = l.find((t => t.id === e));
                    t && (t.filteredValue = [])
                })), t.store.commit("filterChange", {column: l, values: [], silent: !0, multi: !0})
            } else n.forEach((e => {
                const t = u.value.find((t => t.id === e));
                t && (t.filteredValue = [])
            })), S.value = {}, t.store.commit("filterChange", {column: {}, values: [], silent: !0})
        },
        clearSort: () => {
            E.value && (M(null, null, null), t.store.commit("changeSortCondition", {silent: !0}))
        },
        toggleRowExpansion: H,
        setExpandRowKeysAdapter: e => {
            z(e), I(e)
        },
        setCurrentRowKey: U,
        toggleRowExpansionAdapter: (e, t) => {
            u.value.some((({type: e}) => "expand" === e)) ? H(e, t) : B(e, t)
        },
        isRowExpanded: _,
        updateExpandRows: j,
        updateCurrentRowData: Y,
        loadOrToggle: V,
        updateTreeData: K,
        states: {
            tableSize: l,
            rowKey: a,
            data: n,
            _data: o,
            isComplex: r,
            _columns: s,
            originColumns: i,
            columns: u,
            fixedColumns: d,
            rightFixedColumns: c,
            leafColumns: p,
            fixedLeafColumns: h,
            rightFixedLeafColumns: f,
            updateOrderFns: [],
            leafColumnsLength: v,
            fixedLeafColumnsLength: m,
            rightFixedLeafColumnsLength: g,
            isAllSelected: b,
            selection: y,
            reserveSelection: w,
            selectOnIndeterminate: x,
            selectable: C,
            filters: S,
            filteredData: k,
            sortingColumn: E,
            sortProp: N,
            sortOrder: R,
            hoverRow: O, ...$, ...q, ...Q
        }
    }
}

function Pa(e, t) {
    return e.map((e => {
        var l;
        return e.id === t.id ? t : ((null == (l = e.children) ? void 0 : l.length) && (e.children = Pa(e.children, t)), e)
    }))
}

function Aa(e) {
    e.forEach((e => {
        var t, l;
        e.no = null == (t = e.getColumnIndex) ? void 0 : t.call(e), (null == (l = e.children) ? void 0 : l.length) && Aa(e.children)
    })), e.sort(((e, t) => e.no - t.no))
}

const La = {
    rowKey: "rowKey",
    defaultExpandAll: "defaultExpandAll",
    selectOnIndeterminate: "selectOnIndeterminate",
    indent: "indent",
    lazy: "lazy",
    data: "data",
    "treeProps.hasChildren": {key: "lazyColumnIdentifier", default: "hasChildren"},
    "treeProps.children": {key: "childrenColumnName", default: "children"}
};

function Fa(e, t) {
    if (!e) throw new Error("Table is required.");
    const l = function () {
        const e = we(), t = Oa();
        return {
            ns: ae("table"), ...t, mutations: {
                setData(t, l) {
                    const a = G(t._data) !== l;
                    t.data.value = l, t._data.value = l, e.store.execQuery(), e.store.updateCurrentRowData(), e.store.updateExpandRows(), e.store.updateTreeData(e.store.states.defaultExpandAll.value), G(t.reserveSelection) ? (e.store.assertRowKey(), e.store.updateSelectionByRowKey()) : a ? e.store.clearSelection() : e.store.cleanSelection(), e.store.updateAllSelected(), e.$ready && e.store.scheduleLayout()
                }, insertColumn(t, l, a, n) {
                    const o = G(t._columns);
                    let r = [];
                    a ? (a && !a.children && (a.children = []), a.children.push(l), r = Pa(o, a)) : (o.push(l), r = o), Aa(r), t._columns.value = r, t.updateOrderFns.push(n), "selection" === l.type && (t.selectable.value = l.selectable, t.reserveSelection.value = l.reserveSelection), e.$ready && (e.store.updateColumns(), e.store.scheduleLayout())
                }, updateColumnOrder(t, l) {
                    var a;
                    (null == (a = l.getColumnIndex) ? void 0 : a.call(l)) !== l.no && (Aa(t._columns.value), e.$ready && e.store.updateColumns())
                }, removeColumn(t, l, a, n) {
                    const o = G(t._columns) || [];
                    if (a) a.children.splice(a.children.findIndex((e => e.id === l.id)), 1), Le((() => {
                        var e;
                        0 === (null == (e = a.children) ? void 0 : e.length) && delete a.children
                    })), t._columns.value = Pa(o, a); else {
                        const e = o.indexOf(l);
                        e > -1 && (o.splice(e, 1), t._columns.value = o)
                    }
                    const r = t.updateOrderFns.indexOf(n);
                    r > -1 && t.updateOrderFns.splice(r, 1), e.$ready && (e.store.updateColumns(), e.store.scheduleLayout())
                }, sort(t, l) {
                    const {prop: a, order: n, init: o} = l;
                    if (a) {
                        const l = G(t.columns).find((e => e.property === a));
                        l && (l.order = n, e.store.updateSort(l, a, n), e.store.commit("changeSortCondition", {init: o}))
                    }
                }, changeSortCondition(t, l) {
                    const {sortingColumn: a, sortProp: n, sortOrder: o} = t, r = G(a), s = G(n), i = G(o);
                    null === i && (t.sortingColumn.value = null, t.sortProp.value = null), e.store.execQuery({filter: !0}), l && (l.silent || l.init) || e.emit("sort-change", {
                        column: r,
                        prop: s,
                        order: i
                    }), e.store.updateTableScrollY()
                }, filterChange(t, l) {
                    const {column: a, values: n, silent: o} = l, r = e.store.updateFilters(a, n);
                    e.store.execQuery(), o || e.emit("filter-change", r), e.store.updateTableScrollY()
                }, toggleAllSelection() {
                    e.store.toggleAllSelection()
                }, rowSelectedChanged(t, l) {
                    e.store.toggleRowSelection(l), e.store.updateAllSelected()
                }, setHoverRow(e, t) {
                    e.hoverRow.value = t
                }, setCurrentRow(t, l) {
                    e.store.updateCurrentRow(l)
                }
            }, commit: function (t, ...l) {
                const a = e.store.mutations;
                if (!a[t]) throw new Error(`Action not found: ${t}`);
                a[t].apply(e, [e.store.states].concat(l))
            }, updateTableScrollY: function () {
                Le((() => e.layout.updateScrollY.apply(e.layout)))
            }
        }
    }();
    return l.toggleAllSelection = o(l._toggleAllSelection, 10), Object.keys(La).forEach((e => {
        Ma(Wa(t, e), e, l)
    })), function (e, t) {
        Object.keys(La).forEach((l => {
            oe((() => Wa(t, l)), (t => {
                Ma(t, l, e)
            }))
        }))
    }(l, t), l
}

function Ma(e, t, l) {
    let a = e, n = La[t];
    "object" == typeof La[t] && (n = n.key, a = a || La[t].default), l.states[n].value = a
}

function Wa(e, t) {
    if (t.includes(".")) {
        const l = t.split(".");
        let a = e;
        return l.forEach((e => {
            a = a[e]
        })), a
    }
    return e[t]
}

class Ta {
    constructor(e) {
        this.observers = [], this.table = null, this.store = null, this.columns = [], this.fit = !0, this.showHeader = !0, this.height = ne(null), this.scrollX = ne(!1), this.scrollY = ne(!1), this.bodyWidth = ne(null), this.fixedWidth = ne(null), this.rightFixedWidth = ne(null), this.gutterWidth = 0;
        for (const t in e) Ee(e, t) && (Fe(this[t]) ? this[t].value = e[t] : this[t] = e[t]);
        if (!this.table) throw new Error("Table is required for Table Layout");
        if (!this.store) throw new Error("Store is required for Table Layout")
    }

    updateScrollY() {
        if (null === this.height.value) return !1;
        const e = this.table.refs.scrollBarRef;
        if (this.table.vnode.el && (null == e ? void 0 : e.wrapRef)) {
            let t = !0;
            const l = this.scrollY.value;
            return t = e.wrapRef.scrollHeight > e.wrapRef.clientHeight, this.scrollY.value = t, l !== t
        }
        return !1
    }

    setHeight(e, t = "height") {
        if (!Me) return;
        const l = this.table.vnode.el;
        var a;
        if (e = "number" == typeof (a = e) ? a : "string" == typeof a ? /^\d+(?:px)?$/.test(a) ? Number.parseInt(a, 10) : a : null, this.height.value = Number(e), !l && (e || 0 === e)) return Le((() => this.setHeight(e, t)));
        "number" == typeof e ? (l.style[t] = `${e}px`, this.updateElsHeight()) : "string" == typeof e && (l.style[t] = e, this.updateElsHeight())
    }

    setMaxHeight(e) {
        this.setHeight(e, "max-height")
    }

    getFlattenColumns() {
        const e = [];
        return this.table.store.states.columns.value.forEach((t => {
            t.isColumnGroup ? e.push.apply(e, t.columns) : e.push(t)
        })), e
    }

    updateElsHeight() {
        this.updateScrollY(), this.notifyObservers("scrollable")
    }

    headerDisplayNone(e) {
        if (!e) return !0;
        let t = e;
        for (; "DIV" !== t.tagName;) {
            if ("none" === getComputedStyle(t).display) return !0;
            t = t.parentElement
        }
        return !1
    }

    updateColumnsWidth() {
        if (!Me) return;
        const e = this.fit, t = this.table.vnode.el.clientWidth;
        let l = 0;
        const a = this.getFlattenColumns(), n = a.filter((e => "number" != typeof e.width));
        if (a.forEach((e => {
            "number" == typeof e.width && e.realWidth && (e.realWidth = null)
        })), n.length > 0 && e) {
            if (a.forEach((e => {
                l += Number(e.width || e.minWidth || 80)
            })), l <= t) {
                this.scrollX.value = !1;
                const e = t - l;
                if (1 === n.length) n[0].realWidth = Number(n[0].minWidth || 80) + e; else {
                    const t = e / n.reduce(((e, t) => e + Number(t.minWidth || 80)), 0);
                    let l = 0;
                    n.forEach(((e, a) => {
                        if (0 === a) return;
                        const n = Math.floor(Number(e.minWidth || 80) * t);
                        l += n, e.realWidth = Number(e.minWidth || 80) + n
                    })), n[0].realWidth = Number(n[0].minWidth || 80) + e - l
                }
            } else this.scrollX.value = !0, n.forEach((e => {
                e.realWidth = Number(e.minWidth)
            }));
            this.bodyWidth.value = Math.max(l, t), this.table.state.resizeState.value.width = this.bodyWidth.value
        } else a.forEach((e => {
            e.width || e.minWidth ? e.realWidth = Number(e.width || e.minWidth) : e.realWidth = 80, l += e.realWidth
        })), this.scrollX.value = l > t, this.bodyWidth.value = l;
        const o = this.store.states.fixedColumns.value;
        if (o.length > 0) {
            let e = 0;
            o.forEach((t => {
                e += Number(t.realWidth || t.width)
            })), this.fixedWidth.value = e
        }
        const r = this.store.states.rightFixedColumns.value;
        if (r.length > 0) {
            let e = 0;
            r.forEach((t => {
                e += Number(t.realWidth || t.width)
            })), this.rightFixedWidth.value = e
        }
        this.notifyObservers("columns")
    }

    addObserver(e) {
        this.observers.push(e)
    }

    removeObserver(e) {
        const t = this.observers.indexOf(e);
        -1 !== t && this.observers.splice(t, 1)
    }

    notifyObservers(e) {
        this.observers.forEach((t => {
            var l, a;
            switch (e) {
                case"columns":
                    null == (l = t.state) || l.onColumnsChange(this);
                    break;
                case"scrollable":
                    null == (a = t.state) || a.onScrollableChange(this);
                    break;
                default:
                    throw new Error(`Table Layout don't have event ${e}.`)
            }
        }))
    }
}

const {CheckboxGroup: za} = r, Ha = I({
    name: "ElTableFilterPanel",
    components: {
        ElCheckbox: r,
        ElCheckboxGroup: za,
        ElScrollbar: We,
        ElTooltip: Nt,
        ElIcon: Q,
        ArrowDown: Te,
        ArrowUp: ze
    },
    directives: {ClickOutside: s},
    props: {
        placement: {type: String, default: "bottom-start"},
        store: {type: Object},
        column: {type: Object},
        upDataColumn: {type: Function}
    },
    setup(e) {
        const t = we(), {t: l} = B(), a = ae("table-filter"), n = null == t ? void 0 : t.parent;
        n.filterPanels.value[e.column.id] || (n.filterPanels.value[e.column.id] = t);
        const o = ne(!1), r = ne(null), s = D((() => e.column && e.column.filters)), i = D({
            get: () => {
                var t;
                return ((null == (t = e.column) ? void 0 : t.filteredValue) || [])[0]
            }, set: e => {
                u.value && (null != e ? u.value.splice(0, 1, e) : u.value.splice(0, 1))
            }
        }), u = D({
            get: () => e.column && e.column.filteredValue || [], set(t) {
                e.column && e.upDataColumn("filteredValue", t)
            }
        }), d = D((() => !e.column || e.column.filterMultiple)), c = () => {
            o.value = !1
        }, p = t => {
            e.store.commit("filterChange", {column: e.column, values: t}), e.store.updateAllSelected()
        };
        oe(o, (t => {
            e.column && e.upDataColumn("filterOpened", t)
        }), {immediate: !0});
        const h = D((() => {
            var e, t;
            return null == (t = null == (e = r.value) ? void 0 : e.popperRef) ? void 0 : t.contentRef
        }));
        return {
            tooltipVisible: o, multiple: d, filteredValue: u, filterValue: i, filters: s, handleConfirm: () => {
                p(u.value), c()
            }, handleReset: () => {
                u.value = [], p(u.value), c()
            }, handleSelect: e => {
                i.value = e, p(null != e ? u.value : []), c()
            }, isActive: e => e.value === i.value, t: l, ns: a, showFilterPanel: e => {
                e.stopPropagation(), o.value = !o.value
            }, hideFilterPanel: () => {
                o.value = !1
            }, popperPaneRef: h, tooltip: r
        }
    }
}), ja = {key: 0}, $a = ["disabled"], _a = ["label", "onClick"];
var Ia = Z(Ha, [["render", function (e, t, l, a, n, o) {
    const r = He("el-checkbox"), s = He("el-checkbox-group"), i = He("el-scrollbar"), u = He("arrow-up"),
        d = He("arrow-down"), c = He("el-icon"), p = He("el-tooltip"), h = je("click-outside");
    return K(), Y(p, {
        ref: "tooltip",
        visible: e.tooltipVisible,
        offset: 0,
        placement: e.placement,
        "show-arrow": !1,
        "stop-popper-mouse-event": !1,
        teleported: "",
        effect: "light",
        pure: "",
        "popper-class": e.ns.b(),
        persistent: ""
    }, {
        content: X((() => [e.multiple ? (K(), V("div", ja, [de("div", {class: ue(e.ns.e("content"))}, [re(i, {"wrap-class": e.ns.e("wrap")}, {
            default: X((() => [re(s, {
                modelValue: e.filteredValue,
                "onUpdate:modelValue": t[0] || (t[0] = t => e.filteredValue = t),
                class: ue(e.ns.e("checkbox-group"))
            }, {
                default: X((() => [(K(!0), V(se, null, ie(e.filters, (e => (K(), Y(r, {
                    key: e.value,
                    label: e.value
                }, {default: X((() => [$e(q(e.text), 1)])), _: 2}, 1032, ["label"])))), 128))])), _: 1
            }, 8, ["modelValue", "class"])])), _: 1
        }, 8, ["wrap-class"])], 2), de("div", {class: ue(e.ns.e("bottom"))}, [de("button", {
            class: ue({[e.ns.is("disabled")]: 0 === e.filteredValue.length}),
            disabled: 0 === e.filteredValue.length,
            type: "button",
            onClick: t[1] || (t[1] = (...t) => e.handleConfirm && e.handleConfirm(...t))
        }, q(e.t("el.table.confirmFilter")), 11, $a), de("button", {
            type: "button",
            onClick: t[2] || (t[2] = (...t) => e.handleReset && e.handleReset(...t))
        }, q(e.t("el.table.resetFilter")), 1)], 2)])) : (K(), V("ul", {
            key: 1,
            class: ue(e.ns.e("list"))
        }, [de("li", {
            class: ue([e.ns.e("list-item"), {[e.ns.is("active")]: void 0 === e.filterValue || null === e.filterValue}]),
            onClick: t[3] || (t[3] = t => e.handleSelect(null))
        }, q(e.t("el.table.clearFilter")), 3), (K(!0), V(se, null, ie(e.filters, (t => (K(), V("li", {
            key: t.value,
            class: ue([e.ns.e("list-item"), e.ns.is("active", e.isActive(t))]),
            label: t.value,
            onClick: l => e.handleSelect(t.value)
        }, q(t.text), 11, _a)))), 128))], 2))])),
        default: X((() => [_e((K(), V("span", {
            class: ue([`${e.ns.namespace.value}-table__column-filter-trigger`, `${e.ns.namespace.value}-none-outline`]),
            onClick: t[4] || (t[4] = (...t) => e.showFilterPanel && e.showFilterPanel(...t))
        }, [re(c, null, {
            default: X((() => [e.column.filterOpened ? (K(), Y(u, {key: 0})) : (K(), Y(d, {key: 1}))])),
            _: 1
        })], 2)), [[h, e.hideFilterPanel, e.popperPaneRef]])])),
        _: 1
    }, 8, ["visible", "placement", "popper-class"])
}], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/table/src/filter-panel.vue"]]);

function Ba(e) {
    const t = we();
    Ie((() => {
        l.value.addObserver(t)
    })), Be((() => {
        a(l.value), n(l.value)
    })), De((() => {
        a(l.value), n(l.value)
    })), Ke((() => {
        l.value.removeObserver(t)
    }));
    const l = D((() => {
        const t = e.layout;
        if (!t) throw new Error("Can not find table layout.");
        return t
    })), a = t => {
        var l;
        const a = (null == (l = e.vnode.el) ? void 0 : l.querySelectorAll("colgroup > col")) || [];
        if (!a.length) return;
        const n = t.getFlattenColumns(), o = {};
        n.forEach((e => {
            o[e.id] = e
        }));
        for (let e = 0, r = a.length; e < r; e++) {
            const t = a[e], l = t.getAttribute("name"), n = o[l];
            n && t.setAttribute("width", n.realWidth || n.width)
        }
    }, n = t => {
        var l, a;
        const n = (null == (l = e.vnode.el) ? void 0 : l.querySelectorAll("colgroup > col[name=gutter]")) || [];
        for (let e = 0, r = n.length; e < r; e++) {
            n[e].setAttribute("width", t.scrollY.value ? t.gutterWidth : "0")
        }
        const o = (null == (a = e.vnode.el) ? void 0 : a.querySelectorAll("th.gutter")) || [];
        for (let e = 0, r = o.length; e < r; e++) {
            const l = o[e];
            l.style.width = t.scrollY.value ? `${t.gutterWidth}px` : "0", l.style.display = t.scrollY.value ? "" : "none"
        }
    };
    return {tableLayout: l.value, onColumnsChange: a, onScrollableChange: n}
}

const Da = Symbol("ElTable");
const Ka = e => {
    const t = [];
    return e.forEach((e => {
        e.children ? (t.push(e), t.push.apply(t, Ka(e.children))) : t.push(e)
    })), t
};

function Va(e) {
    const t = J(Da), l = D((() => (e => {
        let t = 1;
        const l = (e, a) => {
            if (a && (e.level = a.level + 1, t < e.level && (t = e.level)), e.children) {
                let t = 0;
                e.children.forEach((a => {
                    l(a, e), t += a.colSpan
                })), e.colSpan = t
            } else e.colSpan = 1
        };
        e.forEach((e => {
            e.level = 1, l(e, void 0)
        }));
        const a = [];
        for (let n = 0; n < t; n++) a.push([]);
        return Ka(e).forEach((e => {
            e.children ? (e.rowSpan = 1, e.children.forEach((e => e.isSubColumn = !0))) : e.rowSpan = t - e.level + 1, a[e.level - 1].push(e)
        })), a
    })(e.store.states.originColumns.value)));
    return {
        isGroup: D((() => {
            const e = l.value.length > 1;
            return e && t && (t.state.isGroup.value = !0), e
        })), toggleAllSelection: e => {
            e.stopPropagation(), null == t || t.store.commit("toggleAllSelection")
        }, columnRows: l
    }
}

var qa = I({
    name: "ElTableHeader",
    components: {ElCheckbox: r},
    props: {
        fixed: {type: String, default: ""},
        store: {required: !0, type: Object},
        border: Boolean,
        defaultSort: {type: Object, default: () => ({prop: "", order: ""})}
    },
    setup(e, {emit: t}) {
        const l = we(), a = J(Da), n = ae("table"), o = ne({}), {onColumnsChange: r, onScrollableChange: s} = Ba(a);
        Be((async () => {
            await Le(), await Le();
            const {prop: t, order: l} = e.defaultSort;
            null == a || a.store.commit("sort", {prop: t, order: l, init: !0})
        }));
        const {
            handleHeaderClick: i,
            handleHeaderContextMenu: u,
            handleMouseDown: d,
            handleMouseMove: c,
            handleMouseOut: p,
            handleSortClick: h,
            handleFilterClick: f
        } = function (e, t) {
            const l = we(), a = J(Da), n = e => {
                e.stopPropagation()
            }, o = ne(null), r = ne(!1), s = ne({}), i = (t, l, n) => {
                var o;
                t.stopPropagation();
                const r = l.order === n ? null : n || (({order: e, sortOrders: t}) => {
                    if ("" === e) return t[0];
                    const l = t.indexOf(e || null);
                    return t[l > t.length - 2 ? 0 : l + 1]
                })(l), s = null == (o = t.target) ? void 0 : o.closest("th");
                if (s && qe(s, "noclick")) return void Ye(s, "noclick");
                if (!l.sortable) return;
                const i = e.store.states;
                let u, d = i.sortProp.value;
                const c = i.sortingColumn.value;
                (c !== l || c === l && null === c.order) && (c && (c.order = null), i.sortingColumn.value = l, d = l.property), u = l.order = r || null, i.sortProp.value = d, i.sortOrder.value = u, null == a || a.store.commit("changeSortCondition")
            };
            return {
                handleHeaderClick: (e, t) => {
                    !t.filters && t.sortable ? i(e, t, !1) : t.filterable && !t.sortable && n(e), null == a || a.emit("header-click", t, e)
                }, handleHeaderContextMenu: (e, t) => {
                    null == a || a.emit("header-contextmenu", t, e)
                }, handleMouseDown: (n, i) => {
                    if (Me && !(i.children && i.children.length > 0) && o.value && e.border) {
                        r.value = !0;
                        const u = a;
                        t("set-drag-visible", !0);
                        const d = (null == u ? void 0 : u.vnode.el).getBoundingClientRect().left,
                            c = l.vnode.el.querySelector(`th.${i.id}`), p = c.getBoundingClientRect(),
                            h = p.left - d + 30;
                        Ve(c, "noclick"), s.value = {
                            startMouseLeft: n.clientX,
                            startLeft: p.right - d,
                            startColumnLeft: p.left - d,
                            tableLeft: d
                        };
                        const f = null == u ? void 0 : u.refs.resizeProxy;
                        f.style.left = `${s.value.startLeft}px`, document.onselectstart = function () {
                            return !1
                        }, document.ondragstart = function () {
                            return !1
                        };
                        const v = e => {
                            const t = e.clientX - s.value.startMouseLeft, l = s.value.startLeft + t;
                            f.style.left = `${Math.max(h, l)}px`
                        }, m = () => {
                            if (r.value) {
                                const {startColumnLeft: l, startLeft: a} = s.value,
                                    d = Number.parseInt(f.style.left, 10) - l;
                                i.width = i.realWidth = d, null == u || u.emit("header-dragend", i.width, a - l, i, n), requestAnimationFrame((() => {
                                    e.store.scheduleLayout(!1, !0)
                                })), document.body.style.cursor = "", r.value = !1, o.value = null, s.value = {}, t("set-drag-visible", !1)
                            }
                            document.removeEventListener("mousemove", v), document.removeEventListener("mouseup", m), document.onselectstart = null, document.ondragstart = null, setTimeout((() => {
                                Ye(c, "noclick")
                            }), 0)
                        };
                        document.addEventListener("mousemove", v), document.addEventListener("mouseup", m)
                    }
                }, handleMouseMove: (t, l) => {
                    var a;
                    if (l.children && l.children.length > 0) return;
                    const n = null == (a = t.target) ? void 0 : a.closest("th");
                    if (l && l.resizable && !r.value && e.border) {
                        const e = n.getBoundingClientRect(), a = document.body.style;
                        e.width > 12 && e.right - t.pageX < 8 ? (a.cursor = "col-resize", qe(n, "is-sortable") && (n.style.cursor = "col-resize"), o.value = l) : r.value || (a.cursor = "", qe(n, "is-sortable") && (n.style.cursor = "pointer"), o.value = null)
                    }
                }, handleMouseOut: () => {
                    Me && (document.body.style.cursor = "")
                }, handleSortClick: i, handleFilterClick: n
            }
        }(e, t), {
            getHeaderRowStyle: v,
            getHeaderRowClass: m,
            getHeaderCellStyle: g,
            getHeaderCellClass: b
        } = function (e) {
            const t = J(Da), l = ae("table");
            return {
                getHeaderRowStyle: e => {
                    const l = null == t ? void 0 : t.props.headerRowStyle;
                    return "function" == typeof l ? l.call(null, {rowIndex: e}) : l
                }, getHeaderRowClass: e => {
                    const l = [], a = null == t ? void 0 : t.props.headerRowClassName;
                    return "string" == typeof a ? l.push(a) : "function" == typeof a && l.push(a.call(null, {rowIndex: e})), l.join(" ")
                }, getHeaderCellStyle: (l, a, n, o) => {
                    var r;
                    let s = null != (r = null == t ? void 0 : t.props.headerCellStyle) ? r : {};
                    "function" == typeof s && (s = s.call(null, {rowIndex: l, columnIndex: a, row: n, column: o}));
                    const i = ka(a, o.fixed, e.store, n);
                    return Ea(i, "left"), Ea(i, "right"), Object.assign({}, s, i)
                }, getHeaderCellClass: (a, n, o, r) => {
                    const s = Ca(l.b(), n, r.fixed, e.store, o),
                        i = [r.id, r.order, r.headerAlign, r.className, r.labelClassName, ...s];
                    r.children || i.push("is-leaf"), r.sortable && i.push("is-sortable");
                    const u = null == t ? void 0 : t.props.headerCellClassName;
                    return "string" == typeof u ? i.push(u) : "function" == typeof u && i.push(u.call(null, {
                        rowIndex: a,
                        columnIndex: n,
                        row: o,
                        column: r
                    })), i.push(l.e("cell")), i.filter((e => Boolean(e))).join(" ")
                }
            }
        }(e), {isGroup: y, toggleAllSelection: w, columnRows: x} = Va(e);
        return l.state = {onColumnsChange: r, onScrollableChange: s}, l.filterPanels = o, {
            ns: n,
            filterPanels: o,
            onColumnsChange: r,
            onScrollableChange: s,
            columnRows: x,
            getHeaderRowClass: m,
            getHeaderRowStyle: v,
            getHeaderCellClass: b,
            getHeaderCellStyle: g,
            handleHeaderClick: i,
            handleHeaderContextMenu: u,
            handleMouseDown: d,
            handleMouseMove: c,
            handleMouseOut: p,
            handleSortClick: h,
            handleFilterClick: f,
            isGroup: y,
            toggleAllSelection: w
        }
    },
    render() {
        const {
            ns: e,
            isGroup: t,
            columnRows: l,
            getHeaderCellStyle: a,
            getHeaderCellClass: n,
            getHeaderRowClass: o,
            getHeaderRowStyle: r,
            handleHeaderClick: s,
            handleHeaderContextMenu: i,
            handleMouseDown: u,
            handleMouseMove: d,
            handleSortClick: c,
            handleMouseOut: p,
            store: h,
            $parent: f
        } = this;
        let v = 1;
        return Se("thead", {class: {[e.is("group")]: t}}, l.map(((e, t) => Se("tr", {
            class: o(t),
            key: t,
            style: r(t)
        }, e.map(((l, o) => (l.rowSpan > v && (v = l.rowSpan), Se("th", {
            class: n(t, o, e, l),
            colspan: l.colSpan,
            key: `${l.id}-thead`,
            rowspan: l.rowSpan,
            style: a(t, o, e, l),
            onClick: e => s(e, l),
            onContextmenu: e => i(e, l),
            onMousedown: e => u(e, l),
            onMousemove: e => d(e, l),
            onMouseout: p
        }, [Se("div", {class: ["cell", l.filteredValue && l.filteredValue.length > 0 ? "highlight" : ""]}, [l.renderHeader ? l.renderHeader({
            column: l,
            $index: o,
            store: h,
            _self: f
        }) : l.label, l.sortable && Se("span", {
            onClick: e => c(e, l),
            class: "caret-wrapper"
        }, [Se("i", {
            onClick: e => c(e, l, "ascending"),
            class: "sort-caret ascending"
        }), Se("i", {
            onClick: e => c(e, l, "descending"),
            class: "sort-caret descending"
        })]), l.filterable && Se(Ia, {
            store: h,
            placement: l.filterPlacement || "bottom-start",
            column: l,
            upDataColumn: (e, t) => {
                l[e] = t
            }
        })])]))))))))
    }
});

function Ya(e) {
    const t = J(Da), l = ne(""), a = ne(Se("div")), {nextZIndex: n} = Xe(), r = (l, a, n) => {
        var o;
        const r = t, s = sa(l);
        let i;
        const u = null == (o = null == r ? void 0 : r.vnode.el) ? void 0 : o.dataset.prefix;
        s && (i = ca({columns: e.store.states.columns.value}, s, u), i && (null == r || r.emit(`cell-${n}`, a, i, s, l))), null == r || r.emit(`row-${n}`, a, i, l)
    };
    return {
        handleDoubleClick: (e, t) => {
            r(e, t, "dblclick")
        }, handleClick: (t, l) => {
            e.store.commit("setCurrentRow", l), r(t, l, "click")
        }, handleContextMenu: (e, t) => {
            r(e, t, "contextmenu")
        }, handleMouseEnter: o((t => {
            e.store.commit("setHoverRow", t)
        }), 30), handleMouseLeave: o((() => {
            e.store.commit("setHoverRow", null)
        }), 30), handleCellMouseEnter: (l, a, o) => {
            var r;
            const s = t, i = sa(l), u = null == (r = null == s ? void 0 : s.vnode.el) ? void 0 : r.dataset.prefix;
            if (i) {
                const t = ca({columns: e.store.states.columns.value}, i, u),
                    n = s.hoverState = {cell: i, column: t, row: a};
                null == s || s.emit("cell-mouse-enter", n.row, n.column, n.cell, l)
            }
            if (!o) return;
            const d = l.target.querySelector(".cell");
            if (!qe(d, `${u}-tooltip`) || !d.childNodes.length) return;
            const c = document.createRange();
            c.setStart(d, 0), c.setEnd(d, d.childNodes.length);
            (Math.round(c.getBoundingClientRect().width) + ((Number.parseInt(Ue(d, "paddingLeft"), 10) || 0) + (Number.parseInt(Ue(d, "paddingRight"), 10) || 0)) > d.offsetWidth || d.scrollWidth > d.offsetWidth) && function (e, t, l, a, n) {
                n = Ut({enterable: !0, showArrow: !0}, n);
                const o = null == e ? void 0 : e.dataset.prefix,
                    r = null == e ? void 0 : e.querySelector(`.${o}-scrollbar__wrap`);

                function s() {
                    i && i.update()
                }

                null == ba || ba(), ba = () => {
                    try {
                        i && i.destroy(), c && (null == e || e.removeChild(c)), t.removeEventListener("mouseenter", u), t.removeEventListener("mouseleave", d), null == r || r.removeEventListener("scroll", ba), ba = void 0
                    } catch (l) {
                    }
                };
                let i = null, u = s, d = ba;
                n.enterable && ({onOpen: u, onClose: d} = kt({
                    showAfter: n.showAfter,
                    hideAfter: n.hideAfter,
                    open: s,
                    close: ba
                }));
                const c = function () {
                    const t = "light" === n.effect, r = document.createElement("div");
                    return r.className = [`${o}-popper`, t ? "is-light" : "is-dark", n.popperClass || ""].join(" "), l = ra(l), r.innerHTML = l, r.style.zIndex = String(a()), null == e || e.appendChild(r), r
                }();
                c.onmouseenter = u, c.onmouseleave = d;
                const p = [];
                if (n.offset && p.push({name: "offset", options: {offset: [0, n.offset]}}), n.showArrow) {
                    const e = c.appendChild(function () {
                        const e = document.createElement("div");
                        return e.className = `${o}-popper__arrow`, e
                    }());
                    p.push({name: "arrow", options: {element: e, padding: 10}})
                }
                const h = n.popperOptions || {};
                i = Et(t, c, {
                    placement: n.placement || "top",
                    strategy: "fixed", ...h,
                    modifiers: h.modifiers ? p.concat(h.modifiers) : p
                }), t.addEventListener("mouseenter", u), t.addEventListener("mouseleave", d), null == r || r.addEventListener("scroll", ba)
            }(null == t ? void 0 : t.refs.tableWrapper, i, i.innerText || i.textContent, n, o)
        }, handleCellMouseLeave: e => {
            if (!sa(e)) return;
            const l = null == t ? void 0 : t.hoverState;
            null == t || t.emit("cell-mouse-leave", null == l ? void 0 : l.row, null == l ? void 0 : l.column, null == l ? void 0 : l.cell, e)
        }, tooltipContent: l, tooltipTrigger: a
    }
}

function Xa(e) {
    const t = J(Da), l = ae("table"), {
        handleDoubleClick: a,
        handleClick: n,
        handleContextMenu: o,
        handleMouseEnter: r,
        handleMouseLeave: s,
        handleCellMouseEnter: i,
        handleCellMouseLeave: u,
        tooltipContent: d,
        tooltipTrigger: c
    } = Ya(e), {
        getRowStyle: p,
        getRowClass: h,
        getCellStyle: f,
        getCellClass: v,
        getSpan: m,
        getColspanRealWidth: g
    } = function (e) {
        const t = J(Da), l = ae("table");
        return {
            getRowStyle: (e, l) => {
                const a = null == t ? void 0 : t.props.rowStyle;
                return "function" == typeof a ? a.call(null, {row: e, rowIndex: l}) : a || null
            }, getRowClass: (a, n) => {
                const o = [l.e("row")];
                (null == t ? void 0 : t.props.highlightCurrentRow) && a === e.store.states.currentRow.value && o.push("current-row"), e.stripe && n % 2 == 1 && o.push(l.em("row", "striped"));
                const r = null == t ? void 0 : t.props.rowClassName;
                return "string" == typeof r ? o.push(r) : "function" == typeof r && o.push(r.call(null, {
                    row: a,
                    rowIndex: n
                })), o
            }, getCellStyle: (l, a, n, o) => {
                const r = null == t ? void 0 : t.props.cellStyle;
                let s = null != r ? r : {};
                "function" == typeof r && (s = r.call(null, {rowIndex: l, columnIndex: a, row: n, column: o}));
                const i = ka(a, null == e ? void 0 : e.fixed, e.store);
                return Ea(i, "left"), Ea(i, "right"), Object.assign({}, s, i)
            }, getCellClass: (a, n, o, r, s) => {
                const i = Ca(l.b(), n, null == e ? void 0 : e.fixed, e.store, void 0, s),
                    u = [r.id, r.align, r.className, ...i], d = null == t ? void 0 : t.props.cellClassName;
                return "string" == typeof d ? u.push(d) : "function" == typeof d && u.push(d.call(null, {
                    rowIndex: a,
                    columnIndex: n,
                    row: o,
                    column: r
                })), u.push(l.e("cell")), u.filter((e => Boolean(e))).join(" ")
            }, getSpan: (e, l, a, n) => {
                let o = 1, r = 1;
                const s = null == t ? void 0 : t.props.spanMethod;
                if ("function" == typeof s) {
                    const t = s({row: e, column: l, rowIndex: a, columnIndex: n});
                    Array.isArray(t) ? (o = t[0], r = t[1]) : "object" == typeof t && (o = t.rowspan, r = t.colspan)
                }
                return {rowspan: o, colspan: r}
            }, getColspanRealWidth: (e, t, l) => {
                if (t < 1) return e[l].realWidth;
                const a = e.map((({realWidth: e, width: t}) => e || t)).slice(l, l + t);
                return Number(a.reduce(((e, t) => Number(e) + Number(t)), -1))
            }
        }
    }(e), b = D((() => e.store.states.columns.value.findIndex((({type: e}) => "default" === e)))), y = (e, l) => {
        const a = t.props.rowKey;
        return a ? pa(e, a) : l
    }, w = (d, c, w, C = !1) => {
        const {tooltipEffect: S, tooltipOptions: k, store: E} = e, {indent: N, columns: R} = E.states, O = h(d, c);
        let P = !0;
        w && (O.push(l.em("row", `level-${w.level}`)), P = w.display);
        return Se("tr", {
            style: [P ? null : {display: "none"}, p(d, c)],
            class: O,
            key: y(d, c),
            onDblclick: e => a(e, d),
            onClick: e => n(e, d),
            onContextmenu: e => o(e, d),
            onMouseenter: () => r(c),
            onMouseleave: s
        }, R.value.map(((l, a) => {
            const {rowspan: n, colspan: o} = m(d, l, c, a);
            if (!n || !o) return null;
            const r = {...l};
            r.realWidth = g(R.value, o, a);
            const s = {store: e.store, _self: e.context || t, column: r, row: d, $index: c, cellIndex: a, expanded: C};
            a === b.value && w && (s.treeNode = {
                indent: w.level * N.value,
                level: w.level
            }, "boolean" == typeof w.expanded && (s.treeNode.expanded = w.expanded, "loading" in w && (s.treeNode.loading = w.loading), "noLazyChildren" in w && (s.treeNode.noLazyChildren = w.noLazyChildren)));
            const p = `${c},${a}`, h = r.columnKey || r.rawColumnKey || "", y = x(a, l, s),
                E = l.showOverflowTooltip && Ut({effect: S}, k, l.showOverflowTooltip);
            return Se("td", {
                style: f(c, a, d, l),
                class: v(c, a, d, l, o - 1),
                key: `${h}${p}`,
                rowspan: n,
                colspan: o,
                onMouseenter: e => i(e, d, E),
                onMouseleave: u
            }, [y])
        })))
    }, x = (e, t, l) => t.renderCell(l);
    return {
        wrappedRowRender: (a, n) => {
            const o = e.store, {isRowExpanded: r, assertRowKey: s} = o, {
                treeData: i,
                lazyTreeNodeMap: u,
                childrenColumnName: d,
                rowKey: c
            } = o.states, p = o.states.columns.value;
            if (p.some((({type: e}) => "expand" === e))) {
                const e = r(a), s = w(a, n, void 0, e), i = t.renderExpanded;
                return e ? i ? [[s, Se("tr", {key: `expanded-row__${s.key}`}, [Se("td", {
                    colspan: p.length,
                    class: `${l.e("cell")} ${l.e("expanded-cell")}`
                }, [i({row: a, $index: n, store: o, expanded: e})])])]] : s : [[s]]
            }
            if (Object.keys(i.value).length) {
                s();
                const e = pa(a, c.value);
                let t = i.value[e], l = null;
                t && (l = {
                    expanded: t.expanded,
                    level: t.level,
                    display: !0
                }, "boolean" == typeof t.lazy && ("boolean" == typeof t.loaded && t.loaded && (l.noLazyChildren = !(t.children && t.children.length)), l.loading = t.loading));
                const o = [w(a, n, l)];
                if (t) {
                    let l = 0;
                    const r = (e, a) => {
                        e && e.length && a && e.forEach((e => {
                            const s = {
                                display: a.display && a.expanded,
                                level: a.level + 1,
                                expanded: !1,
                                noLazyChildren: !1,
                                loading: !1
                            }, p = pa(e, c.value);
                            if (null == p) throw new Error("For nested data item, row-key is required.");
                            if (t = {...i.value[p]}, t && (s.expanded = t.expanded, t.level = t.level || s.level, t.display = !(!t.expanded || !s.display), "boolean" == typeof t.lazy && ("boolean" == typeof t.loaded && t.loaded && (s.noLazyChildren = !(t.children && t.children.length)), s.loading = t.loading)), l++, o.push(w(e, n + l, s)), t) {
                                const l = u.value[p] || e[d.value];
                                r(l, t)
                            }
                        }))
                    };
                    t.display = !0;
                    const s = u.value[e] || a[d.value];
                    r(s, t)
                }
                return o
            }
            return w(a, n, void 0)
        }, tooltipContent: d, tooltipTrigger: c
    }
}

var Ua = I({
    name: "ElTableBody",
    props: {
        store: {required: !0, type: Object},
        stripe: Boolean,
        tooltipEffect: String,
        tooltipOptions: {type: Object},
        context: {default: () => ({}), type: Object},
        rowClassName: [String, Function],
        rowStyle: [Object, Function],
        fixed: {type: String, default: ""},
        highlight: Boolean
    },
    setup(e) {
        const t = we(), l = J(Da), a = ae("table"), {
            wrappedRowRender: n,
            tooltipContent: o,
            tooltipTrigger: r
        } = Xa(e), {onColumnsChange: s, onScrollableChange: i} = Ba(l);
        return oe(e.store.states.hoverRow, ((l, n) => {
            if (!e.store.states.isComplex.value || !Me) return;
            let o = window.requestAnimationFrame;
            o || (o = e => window.setTimeout(e, 16)), o((() => {
                const e = null == t ? void 0 : t.vnode.el,
                    o = Array.from((null == e ? void 0 : e.children) || []).filter((e => null == e ? void 0 : e.classList.contains(`${a.e("row")}`))),
                    r = o[n], s = o[l];
                r && Ye(r, "hover-row"), s && Ve(s, "hover-row")
            }))
        })), Ke((() => {
            var e;
            null == (e = ba) || e()
        })), {
            ns: a,
            onColumnsChange: s,
            onScrollableChange: i,
            wrappedRowRender: n,
            tooltipContent: o,
            tooltipTrigger: r
        }
    },
    render() {
        const {wrappedRowRender: e, store: t} = this, l = t.states.data.value || [];
        return Se("tbody", {}, [l.reduce(((t, l) => t.concat(e(l, t.length))), [])])
    }
});

function Ga(e) {
    const t = "auto" === e.tableLayout;
    let l = e.columns || [];
    t && l.every((e => void 0 === e.width)) && (l = []);
    return Se("colgroup", {}, l.map((l => Se("col", (l => {
        const a = {key: `${e.tableLayout}_${l.id}`, style: {}, name: void 0};
        return t ? a.style = {width: `${l.width}px`} : a.name = l.id, a
    })(l)))))
}

function Qa(e) {
    const {columns: t} = function () {
        const e = J(Da), t = null == e ? void 0 : e.store;
        return {
            leftFixedLeafCount: D((() => t.states.fixedLeafColumnsLength.value)),
            rightFixedLeafCount: D((() => t.states.rightFixedColumns.value.length)),
            columnsCount: D((() => t.states.columns.value.length)),
            leftFixedCount: D((() => t.states.fixedColumns.value.length)),
            rightFixedCount: D((() => t.states.rightFixedColumns.value.length)),
            columns: t.states.columns
        }
    }(), l = ae("table");
    return {
        getCellClasses: (t, a) => {
            const n = t[a], o = [l.e("cell"), n.id, n.align, n.labelClassName, ...Ca(l.b(), a, n.fixed, e.store)];
            return n.className && o.push(n.className), n.children || o.push(l.is("leaf")), o
        }, getCellStyles: (t, l) => {
            const a = ka(l, t.fixed, e.store);
            return Ea(a, "left"), Ea(a, "right"), a
        }, columns: t
    }
}

Ga.props = ["columns", "tableLayout"];
var Za = I({
    name: "ElTableFooter",
    props: {
        fixed: {type: String, default: ""},
        store: {required: !0, type: Object},
        summaryMethod: Function,
        sumText: String,
        border: Boolean,
        defaultSort: {type: Object, default: () => ({prop: "", order: ""})}
    },
    setup(e) {
        const {getCellClasses: t, getCellStyles: l, columns: a} = Qa(e);
        return {ns: ae("table"), getCellClasses: t, getCellStyles: l, columns: a}
    },
    render() {
        const {columns: e, getCellStyles: t, getCellClasses: l, summaryMethod: a, sumText: n, ns: o} = this,
            r = this.store.states.data.value;
        let s = [];
        return a ? s = a({columns: e, data: r}) : e.forEach(((e, t) => {
            if (0 === t) return void (s[t] = n);
            const l = r.map((t => Number(t[e.property]))), a = [];
            let o = !0;
            l.forEach((e => {
                if (!Number.isNaN(+e)) {
                    o = !1;
                    const t = `${e}`.split(".")[1];
                    a.push(t ? t.length : 0)
                }
            }));
            const i = Math.max.apply(null, a);
            s[t] = o ? "" : l.reduce(((e, t) => {
                const l = Number(t);
                return Number.isNaN(+l) ? e : Number.parseFloat((e + t).toFixed(Math.min(i, 20)))
            }), 0)
        })), Se("table", {
            class: o.e("footer"),
            cellspacing: "0",
            cellpadding: "0",
            border: "0"
        }, [Ga({columns: e}), Se("tbody", [Se("tr", {}, [...e.map(((a, n) => Se("td", {
            key: n,
            colspan: a.colSpan,
            rowspan: a.rowSpan,
            class: l(e, n),
            style: t(a, n)
        }, [Se("div", {class: ["cell", a.labelClassName]}, [s[n]])])))])])])
    }
});

function Ja(e, t, l, a) {
    const n = ne(!1), o = ne(null), r = ne(!1), s = ne({width: null, height: null, headerHeight: null}), i = ne(!1),
        u = ne(), d = ne(0), c = ne(0), p = ne(0), h = ne(0);
    ce((() => {
        t.setHeight(e.height)
    })), ce((() => {
        t.setMaxHeight(e.maxHeight)
    })), oe((() => [e.currentRowKey, l.states.rowKey]), (([e, t]) => {
        G(t) && G(e) && l.setCurrentRowKey(`${e}`)
    }), {immediate: !0}), oe((() => e.data), (e => {
        a.store.commit("setData", e)
    }), {immediate: !0, deep: !0}), ce((() => {
        e.expandRowKeys && l.setExpandRowKeysAdapter(e.expandRowKeys)
    }));
    const f = D((() => e.height || e.maxHeight || l.states.fixedColumns.value.length > 0 || l.states.rightFixedColumns.value.length > 0)),
        v = D((() => ({width: t.bodyWidth.value ? `${t.bodyWidth.value}px` : ""}))), m = () => {
            f.value && t.updateElsHeight(), t.updateColumnsWidth(), requestAnimationFrame(b)
        };
    Be((async () => {
        await Le(), l.updateColumns(), y(), requestAnimationFrame(m);
        const t = a.vnode.el, n = a.refs.headerWrapper;
        e.flexible && t && t.parentElement && (t.parentElement.style.minWidth = "0"), s.value = {
            width: u.value = t.offsetWidth,
            height: t.offsetHeight,
            headerHeight: e.showHeader && n ? n.offsetHeight : null
        }, l.states.columns.value.forEach((e => {
            e.filteredValue && e.filteredValue.length && a.store.commit("filterChange", {
                column: e,
                values: e.filteredValue,
                silent: !0
            })
        })), a.$ready = !0
    }));
    const g = e => {
            const {tableWrapper: l} = a.refs;
            ((e, l) => {
                if (!e) return;
                const a = Array.from(e.classList).filter((e => !e.startsWith("is-scrolling-")));
                a.push(t.scrollX.value ? l : "is-scrolling-none"), e.className = a.join(" ")
            })(l, e)
        }, b = function () {
            if (!a.refs.scrollBarRef) return;
            if (!t.scrollX.value) {
                const e = "is-scrolling-none";
                return void ((e => {
                    const {tableWrapper: t} = a.refs;
                    return !(!t || !t.classList.contains(e))
                })(e) || g(e))
            }
            const e = a.refs.scrollBarRef.wrapRef;
            if (!e) return;
            const {scrollLeft: l, offsetWidth: n, scrollWidth: o} = e, {headerWrapper: r, footerWrapper: s} = a.refs;
            r && (r.scrollLeft = l), s && (s.scrollLeft = l);
            g(l >= o - n - 1 ? "is-scrolling-right" : 0 === l ? "is-scrolling-left" : "is-scrolling-middle")
        }, y = () => {
            a.refs.scrollBarRef && (a.refs.scrollBarRef.wrapRef && Ge(a.refs.scrollBarRef.wrapRef, "scroll", b, {passive: !0}), e.fit ? Qe(a.vnode.el, w) : Ge(window, "resize", w), Qe(a.refs.bodyWrapper, (() => {
                var e, t;
                w(), null == (t = null == (e = a.refs) ? void 0 : e.scrollBarRef) || t.update()
            })))
        }, w = () => {
            var t, l, n;
            const o = a.vnode.el;
            if (!a.$ready || !o) return;
            let r = !1;
            const {width: i, height: v, headerHeight: g} = s.value, b = u.value = o.offsetWidth;
            i !== b && (r = !0);
            const y = o.offsetHeight;
            (e.height || f.value) && v !== y && (r = !0);
            const w = "fixed" === e.tableLayout ? a.refs.headerWrapper : null == (t = a.refs.tableHeaderRef) ? void 0 : t.$el;
            e.showHeader && (null == w ? void 0 : w.offsetHeight) !== g && (r = !0), d.value = (null == (l = a.refs.tableWrapper) ? void 0 : l.scrollHeight) || 0, p.value = (null == w ? void 0 : w.scrollHeight) || 0, h.value = (null == (n = a.refs.footerWrapper) ? void 0 : n.offsetHeight) || 0, c.value = d.value - p.value - h.value, r && (s.value = {
                width: b,
                height: y,
                headerHeight: e.showHeader && (null == w ? void 0 : w.offsetHeight) || 0
            }, m())
        }, x = bt(), C = D((() => {
            const {bodyWidth: e, scrollY: l, gutterWidth: a} = t;
            return e.value ? e.value - (l.value ? a : 0) + "px" : ""
        })), S = D((() => e.maxHeight ? "fixed" : e.tableLayout)), k = D((() => {
            if (e.data && e.data.length) return null;
            let t = "100%";
            e.height && c.value && (t = `${c.value}px`);
            const l = u.value;
            return {width: l ? `${l}px` : "", height: t}
        })),
        E = D((() => e.height ? {height: Number.isNaN(Number(e.height)) ? e.height : `${e.height}px`} : e.maxHeight ? {maxHeight: Number.isNaN(Number(e.maxHeight)) ? e.maxHeight : `${e.maxHeight}px`} : {})),
        N = D((() => {
            if (e.height) return {height: "100%"};
            if (e.maxHeight) {
                if (Number.isNaN(Number(e.maxHeight))) return {maxHeight: `calc(${e.maxHeight} - ${p.value + h.value}px)`};
                {
                    const t = e.maxHeight;
                    if (d.value >= Number(t)) return {maxHeight: d.value - p.value - h.value + "px"}
                }
            }
            return {}
        }));
    return {
        isHidden: n,
        renderExpanded: o,
        setDragVisible: e => {
            r.value = e
        },
        isGroup: i,
        handleMouseLeave: () => {
            a.store.commit("setHoverRow", null), a.hoverState && (a.hoverState = null)
        },
        handleHeaderFooterMousewheel: (e, t) => {
            const {pixelX: l, pixelY: n} = t;
            Math.abs(l) >= Math.abs(n) && (a.refs.bodyWrapper.scrollLeft += t.pixelX / 5)
        },
        tableSize: x,
        emptyBlockStyle: k,
        handleFixedMousewheel: (e, t) => {
            const l = a.refs.bodyWrapper;
            if (Math.abs(t.spinY) > 0) {
                const a = l.scrollTop;
                t.pixelY < 0 && 0 !== a && e.preventDefault(), t.pixelY > 0 && l.scrollHeight - l.clientHeight > a && e.preventDefault(), l.scrollTop += Math.ceil(t.pixelY / 5)
            } else l.scrollLeft += Math.ceil(t.pixelX / 5)
        },
        resizeProxyVisible: r,
        bodyWidth: C,
        resizeState: s,
        doLayout: m,
        tableBodyStyles: v,
        tableLayout: S,
        scrollbarViewStyle: {display: "inline-block", verticalAlign: "middle"},
        tableInnerStyle: E,
        scrollbarStyle: N
    }
}

function en(e) {
    const t = ne();
    Be((() => {
        (() => {
            const l = e.vnode.el.querySelector(".hidden-columns"), a = e.store.states.updateOrderFns;
            t.value = new MutationObserver((() => {
                a.forEach((e => e()))
            })), t.value.observe(l, {childList: !0, subtree: !0})
        })()
    })), Ke((() => {
        var e;
        null == (e = t.value) || e.disconnect()
    }))
}

var tn = {
    data: {type: Array, default: () => []},
    size: Ze,
    width: [String, Number],
    height: [String, Number],
    maxHeight: [String, Number],
    fit: {type: Boolean, default: !0},
    stripe: Boolean,
    border: Boolean,
    rowKey: [String, Function],
    showHeader: {type: Boolean, default: !0},
    showSummary: Boolean,
    sumText: String,
    summaryMethod: Function,
    rowClassName: [String, Function],
    rowStyle: [Object, Function],
    cellClassName: [String, Function],
    cellStyle: [Object, Function],
    headerRowClassName: [String, Function],
    headerRowStyle: [Object, Function],
    headerCellClassName: [String, Function],
    headerCellStyle: [Object, Function],
    highlightCurrentRow: Boolean,
    currentRowKey: [String, Number],
    emptyText: String,
    expandRowKeys: Array,
    defaultExpandAll: Boolean,
    defaultSort: Object,
    tooltipEffect: String,
    tooltipOptions: Object,
    spanMethod: Function,
    selectOnIndeterminate: {type: Boolean, default: !0},
    indent: {type: Number, default: 16},
    treeProps: {type: Object, default: () => ({hasChildren: "hasChildren", children: "children"})},
    lazy: Boolean,
    load: Function,
    style: {type: Object, default: () => ({})},
    className: {type: String, default: ""},
    tableLayout: {type: String, default: "fixed"},
    scrollbarAlwaysOn: {type: Boolean, default: !1},
    flexible: Boolean
};
let ln = 1;
const an = I({
    name: "ElTable",
    directives: {Mousewheel: xl},
    components: {TableHeader: qa, TableBody: Ua, TableFooter: Za, ElScrollbar: We, hColgroup: Ga},
    props: tn,
    emits: ["select", "select-all", "selection-change", "cell-mouse-enter", "cell-mouse-leave", "cell-contextmenu", "cell-click", "cell-dblclick", "row-click", "row-contextmenu", "row-dblclick", "header-click", "header-contextmenu", "sort-change", "filter-change", "current-change", "header-dragend", "expand-change"],
    setup(e) {
        const {t: t} = B(), l = ae("table"), a = we();
        xe(Da, a);
        const n = Fa(a, e);
        a.store = n;
        const r = new Ta({store: a.store, table: a, fit: e.fit, showHeader: e.showHeader});
        a.layout = r;
        const s = D((() => 0 === (n.states.data.value || []).length)), {
            setCurrentRow: i,
            getSelectionRows: u,
            toggleRowSelection: d,
            clearSelection: c,
            clearFilter: p,
            toggleAllSelection: h,
            toggleRowExpansion: f,
            clearSort: v,
            sort: m
        } = function (e) {
            return {
                setCurrentRow: t => {
                    e.commit("setCurrentRow", t)
                }, getSelectionRows: () => e.getSelectionRows(), toggleRowSelection: (t, l) => {
                    e.toggleRowSelection(t, l, !1), e.updateAllSelected()
                }, clearSelection: () => {
                    e.clearSelection()
                }, clearFilter: t => {
                    e.clearFilter(t)
                }, toggleAllSelection: () => {
                    e.commit("toggleAllSelection")
                }, toggleRowExpansion: (t, l) => {
                    e.toggleRowExpansionAdapter(t, l)
                }, clearSort: () => {
                    e.clearSort()
                }, sort: (t, l) => {
                    e.commit("sort", {prop: t, order: l})
                }
            }
        }(n), {
            isHidden: g,
            renderExpanded: b,
            setDragVisible: y,
            isGroup: w,
            handleMouseLeave: x,
            handleHeaderFooterMousewheel: C,
            tableSize: S,
            emptyBlockStyle: k,
            handleFixedMousewheel: E,
            resizeProxyVisible: N,
            bodyWidth: R,
            resizeState: O,
            doLayout: P,
            tableBodyStyles: A,
            tableLayout: L,
            scrollbarViewStyle: F,
            tableInnerStyle: M,
            scrollbarStyle: W
        } = Ja(e, r, n, a), {scrollBarRef: T, scrollTo: z, setScrollLeft: H, setScrollTop: j} = (() => {
            const e = ne(), t = (t, l) => {
                const a = e.value;
                a && ge(l) && ["Top", "Left"].includes(t) && a[`setScroll${t}`](l)
            };
            return {
                scrollBarRef: e, scrollTo: (t, l) => {
                    const a = e.value;
                    a && a.scrollTo(t, l)
                }, setScrollTop: e => t("Top", e), setScrollLeft: e => t("Left", e)
            }
        })(), $ = o(P, 50), _ = `${l.namespace.value}-table_${ln++}`;
        a.tableId = _, a.state = {isGroup: w, resizeState: O, doLayout: P, debouncedUpdateLayout: $};
        const I = D((() => e.sumText || t("el.table.sumText"))), K = D((() => e.emptyText || t("el.table.emptyText")));
        return en(a), {
            ns: l,
            layout: r,
            store: n,
            handleHeaderFooterMousewheel: C,
            handleMouseLeave: x,
            tableId: _,
            tableSize: S,
            isHidden: g,
            isEmpty: s,
            renderExpanded: b,
            resizeProxyVisible: N,
            resizeState: O,
            isGroup: w,
            bodyWidth: R,
            tableBodyStyles: A,
            emptyBlockStyle: k,
            debouncedUpdateLayout: $,
            handleFixedMousewheel: E,
            setCurrentRow: i,
            getSelectionRows: u,
            toggleRowSelection: d,
            clearSelection: c,
            clearFilter: p,
            toggleAllSelection: h,
            toggleRowExpansion: f,
            clearSort: v,
            doLayout: P,
            sort: m,
            t: t,
            setDragVisible: y,
            context: a,
            computedSumText: I,
            computedEmptyText: K,
            tableLayout: L,
            scrollbarViewStyle: F,
            tableInnerStyle: M,
            scrollbarStyle: W,
            scrollBarRef: T,
            scrollTo: z,
            setScrollLeft: H,
            setScrollTop: j
        }
    }
}), nn = ["data-prefix"], on = {ref: "hiddenColumns", class: "hidden-columns"};
var rn = Z(an, [["render", function (e, t, l, a, n, o) {
    const r = He("hColgroup"), s = He("table-header"), i = He("table-body"), u = He("el-scrollbar"),
        d = He("table-footer"), c = je("mousewheel");
    return K(), V("div", {
        ref: "tableWrapper",
        class: ue([{
            [e.ns.m("fit")]: e.fit,
            [e.ns.m("striped")]: e.stripe,
            [e.ns.m("border")]: e.border || e.isGroup,
            [e.ns.m("hidden")]: e.isHidden,
            [e.ns.m("group")]: e.isGroup,
            [e.ns.m("fluid-height")]: e.maxHeight,
            [e.ns.m("scrollable-x")]: e.layout.scrollX.value,
            [e.ns.m("scrollable-y")]: e.layout.scrollY.value,
            [e.ns.m("enable-row-hover")]: !e.store.states.isComplex.value,
            [e.ns.m("enable-row-transition")]: 0 !== (e.store.states.data.value || []).length && (e.store.states.data.value || []).length < 100,
            "has-footer": e.showSummary
        }, e.ns.m(e.tableSize), e.className, e.ns.b(), e.ns.m(`layout-${e.tableLayout}`)]),
        style: et(e.style),
        "data-prefix": e.ns.namespace.value,
        onMouseleave: t[0] || (t[0] = (...t) => e.handleMouseLeave && e.handleMouseLeave(...t))
    }, [de("div", {
        class: ue(e.ns.e("inner-wrapper")),
        style: et(e.tableInnerStyle)
    }, [de("div", on, [Je(e.$slots, "default")], 512), e.showHeader && "fixed" === e.tableLayout ? _e((K(), V("div", {
        key: 0,
        ref: "headerWrapper",
        class: ue(e.ns.e("header-wrapper"))
    }, [de("table", {
        ref: "tableHeader",
        class: ue(e.ns.e("header")),
        style: et(e.tableBodyStyles),
        border: "0",
        cellpadding: "0",
        cellspacing: "0"
    }, [re(r, {
        columns: e.store.states.columns.value,
        "table-layout": e.tableLayout
    }, null, 8, ["columns", "table-layout"]), re(s, {
        ref: "tableHeaderRef",
        border: e.border,
        "default-sort": e.defaultSort,
        store: e.store,
        onSetDragVisible: e.setDragVisible
    }, null, 8, ["border", "default-sort", "store", "onSetDragVisible"])], 6)], 2)), [[c, e.handleHeaderFooterMousewheel]]) : pe("v-if", !0), de("div", {
        ref: "bodyWrapper",
        class: ue(e.ns.e("body-wrapper"))
    }, [re(u, {
        ref: "scrollBarRef",
        "view-style": e.scrollbarViewStyle,
        "wrap-style": e.scrollbarStyle,
        always: e.scrollbarAlwaysOn
    }, {
        default: X((() => [de("table", {
            ref: "tableBody",
            class: ue(e.ns.e("body")),
            cellspacing: "0",
            cellpadding: "0",
            border: "0",
            style: et({width: e.bodyWidth, tableLayout: e.tableLayout})
        }, [re(r, {
            columns: e.store.states.columns.value,
            "table-layout": e.tableLayout
        }, null, 8, ["columns", "table-layout"]), e.showHeader && "auto" === e.tableLayout ? (K(), Y(s, {
            key: 0,
            ref: "tableHeaderRef",
            border: e.border,
            "default-sort": e.defaultSort,
            store: e.store,
            onSetDragVisible: e.setDragVisible
        }, null, 8, ["border", "default-sort", "store", "onSetDragVisible"])) : pe("v-if", !0), re(i, {
            context: e.context,
            highlight: e.highlightCurrentRow,
            "row-class-name": e.rowClassName,
            "tooltip-effect": e.tooltipEffect,
            "tooltip-options": e.tooltipOptions,
            "row-style": e.rowStyle,
            store: e.store,
            stripe: e.stripe
        }, null, 8, ["context", "highlight", "row-class-name", "tooltip-effect", "tooltip-options", "row-style", "store", "stripe"])], 6), e.isEmpty ? (K(), V("div", {
            key: 0,
            ref: "emptyBlock",
            style: et(e.emptyBlockStyle),
            class: ue(e.ns.e("empty-block"))
        }, [de("span", {class: ue(e.ns.e("empty-text"))}, [Je(e.$slots, "empty", {}, (() => [$e(q(e.computedEmptyText), 1)]))], 2)], 6)) : pe("v-if", !0), e.$slots.append ? (K(), V("div", {
            key: 1,
            ref: "appendWrapper",
            class: ue(e.ns.e("append-wrapper"))
        }, [Je(e.$slots, "append")], 2)) : pe("v-if", !0)])), _: 3
    }, 8, ["view-style", "wrap-style", "always"])], 2), e.showSummary ? _e((K(), V("div", {
        key: 1,
        ref: "footerWrapper",
        class: ue(e.ns.e("footer-wrapper"))
    }, [re(d, {
        border: e.border,
        "default-sort": e.defaultSort,
        store: e.store,
        style: et(e.tableBodyStyles),
        "sum-text": e.computedSumText,
        "summary-method": e.summaryMethod
    }, null, 8, ["border", "default-sort", "store", "style", "sum-text", "summary-method"])], 2)), [[tt, !e.isEmpty], [c, e.handleHeaderFooterMousewheel]]) : pe("v-if", !0), e.border || e.isGroup ? (K(), V("div", {
        key: 2,
        class: ue(e.ns.e("border-left-patch"))
    }, null, 2)) : pe("v-if", !0)], 6), _e(de("div", {
        ref: "resizeProxy",
        class: ue(e.ns.e("column-resize-proxy"))
    }, null, 2), [[tt, e.resizeProxyVisible]])], 46, nn)
}], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/table/src/table.vue"]]);
const sn = {selection: "table-column--selection", expand: "table__expand-column"}, un = {
    default: {order: ""},
    selection: {width: 48, minWidth: 48, realWidth: 48, order: ""},
    expand: {width: 48, minWidth: 48, realWidth: 48, order: ""},
    index: {width: 48, minWidth: 48, realWidth: 48, order: ""}
}, dn = {
    selection: {
        renderHeader: ({store: e}) => Se(r, {
            disabled: e.states.data.value && 0 === e.states.data.value.length,
            size: e.states.tableSize.value,
            indeterminate: e.states.selection.value.length > 0 && !e.states.isAllSelected.value,
            "onUpdate:modelValue": e.toggleAllSelection,
            modelValue: e.states.isAllSelected.value
        }),
        renderCell: ({
                         row: e,
                         column: t,
                         store: l,
                         $index: a
                     }) => Se(r, {
            disabled: !!t.selectable && !t.selectable.call(null, e, a),
            size: l.states.tableSize.value,
            onChange: () => {
                l.commit("rowSelectedChanged", e)
            },
            onClick: e => e.stopPropagation(),
            modelValue: l.isSelected(e)
        }),
        sortable: !1,
        resizable: !1
    }, index: {
        renderHeader: ({column: e}) => e.label || "#", renderCell({column: e, $index: t}) {
            let l = t + 1;
            const a = e.index;
            return "number" == typeof a ? l = t + a : "function" == typeof a && (l = a(t)), Se("div", {}, [l])
        }, sortable: !1
    }, expand: {
        renderHeader: ({column: e}) => e.label || "", renderCell({row: e, store: t, expanded: l}) {
            const {ns: a} = t, n = [a.e("expand-icon")];
            l && n.push(a.em("expand-icon", "expanded"));
            return Se("div", {
                class: n, onClick: function (l) {
                    l.stopPropagation(), t.toggleRowExpansion(e)
                }
            }, {default: () => [Se(Q, null, {default: () => [Se(ye)]})]})
        }, sortable: !1, resizable: !1
    }
};

function cn({row: e, column: t, $index: l}) {
    var a;
    const n = t.property, o = n && lt(e, n).value;
    return t && t.formatter ? t.formatter(e, t, o, l) : (null == (a = null == o ? void 0 : o.toString) ? void 0 : a.call(o)) || ""
}

function pn(e, t) {
    return e.reduce(((e, t) => (e[t] = t, e)), t)
}

function hn(e, t, l) {
    const a = we(), n = ne(""), o = ne(!1), r = ne(), s = ne(), i = ae("table");
    ce((() => {
        r.value = e.align ? `is-${e.align}` : null, r.value
    })), ce((() => {
        s.value = e.headerAlign ? `is-${e.headerAlign}` : r.value, s.value
    }));
    const u = D((() => {
        let e = a.vnode.vParent || a.parent;
        for (; e && !e.tableId && !e.columnId;) e = e.vnode.vParent || e.parent;
        return e
    })), d = D((() => {
        const {store: e} = a.parent;
        if (!e) return !1;
        const {treeData: t} = e.states, l = t.value;
        return l && Object.keys(l).length > 0
    })), c = ne(fa(e.width)), p = ne(va(e.minWidth));
    return {
        columnId: n,
        realAlign: r,
        isSubColumn: o,
        realHeaderAlign: s,
        columnOrTableParent: u,
        setColumnWidth: e => (c.value && (e.width = c.value), p.value && (e.minWidth = p.value), !c.value && p.value && (e.width = void 0), e.minWidth || (e.minWidth = 80), e.realWidth = Number(void 0 === e.width ? e.minWidth : e.width), e),
        setColumnForcedProps: e => {
            const t = e.type, l = dn[t] || {};
            Object.keys(l).forEach((t => {
                const a = l[t];
                "className" !== t && void 0 !== a && (e[t] = a)
            }));
            const a = (e => sn[e] || "")(t);
            if (a) {
                const t = `${G(i.namespace)}-${a}`;
                e.className = e.className ? `${e.className} ${t}` : t
            }
            return e
        },
        setColumnRenders: n => {
            e.renderHeader || "selection" !== n.type && (n.renderHeader = e => {
                a.columnConfig.value.label;
                const l = t.header;
                return l ? l(e) : n.label
            });
            let o = n.renderCell;
            return "expand" === n.type ? (n.renderCell = e => Se("div", {class: "cell"}, [o(e)]), l.value.renderExpanded = e => t.default ? t.default(e) : t.default) : (o = o || cn, n.renderCell = e => {
                let r = null;
                if (t.default) {
                    const l = t.default(e);
                    r = l.some((e => e.type !== nt)) ? l : o(e)
                } else r = o(e);
                const {columns: s} = l.value.store.states, u = s.value.findIndex((e => "default" === e.type)),
                    c = function ({row: e, treeNode: t, store: l}, a = !1) {
                        const {ns: n} = l;
                        if (!t) return a ? [Se("span", {class: n.e("placeholder")})] : null;
                        const o = [], r = function (a) {
                            a.stopPropagation(), t.loading || l.loadOrToggle(e)
                        };
                        if (t.indent && o.push(Se("span", {
                            class: n.e("indent"),
                            style: {"padding-left": `${t.indent}px`}
                        })), "boolean" != typeof t.expanded || t.noLazyChildren) o.push(Se("span", {class: n.e("placeholder")})); else {
                            const e = [n.e("expand-icon"), t.expanded ? n.em("expand-icon", "expanded") : ""];
                            let l = ye;
                            t.loading && (l = at), o.push(Se("div", {
                                class: e,
                                onClick: r
                            }, {default: () => [Se(Q, {class: {[n.is("loading")]: t.loading}}, {default: () => [Se(l)]})]}))
                        }
                        return o
                    }(e, d.value && e.cellIndex === u), p = {class: "cell", style: {}};
                return n.showOverflowTooltip && (p.class = `${p.class} ${G(i.namespace)}-tooltip`, p.style = {width: (e.column.realWidth || Number(e.column.width)) - 1 + "px"}), (e => {
                    function t(e) {
                        var t;
                        "ElTableColumn" === (null == (t = null == e ? void 0 : e.type) ? void 0 : t.name) && (e.vParent = a)
                    }

                    Array.isArray(e) ? e.forEach((e => t(e))) : t(e)
                })(r), Se("div", p, [c, r])
            }), n
        },
        getPropsData: (...t) => t.reduce(((t, l) => (Array.isArray(l) && l.forEach((l => {
            t[l] = e[l]
        })), t)), {}),
        getColumnElIndex: (e, t) => Array.prototype.indexOf.call(e, t),
        updateColumnOrder: () => {
            l.value.store.commit("updateColumnOrder", a.columnConfig.value)
        }
    }
}

var fn = {
    type: {type: String, default: "default"},
    label: String,
    className: String,
    labelClassName: String,
    property: String,
    prop: String,
    width: {type: [String, Number], default: ""},
    minWidth: {type: [String, Number], default: ""},
    renderHeader: Function,
    sortable: {type: [Boolean, String], default: !1},
    sortMethod: Function,
    sortBy: [String, Function, Array],
    resizable: {type: Boolean, default: !0},
    columnKey: String,
    align: String,
    headerAlign: String,
    showOverflowTooltip: [Boolean, Object],
    fixed: [Boolean, String],
    formatter: Function,
    selectable: Function,
    reserveSelection: Boolean,
    filterMethod: Function,
    filteredValue: Array,
    filters: Array,
    filterPlacement: String,
    filterMultiple: {type: Boolean, default: !0},
    index: [Number, Function],
    sortOrders: {
        type: Array,
        default: () => ["ascending", "descending", null],
        validator: e => e.every((e => ["ascending", "descending", null].includes(e)))
    }
};
let vn = 1;
var mn = I({
    name: "ElTableColumn", components: {ElCheckbox: r}, props: fn, setup(e, {slots: t}) {
        const l = we(), a = ne({}), n = D((() => {
            let e = l.parent;
            for (; e && !e.tableId;) e = e.parent;
            return e
        })), {registerNormalWatchers: o, registerComplexWatchers: r} = function (e, t) {
            const l = we();
            return {
                registerComplexWatchers: () => {
                    const a = {realWidth: "width", realMinWidth: "minWidth"}, n = pn(["fixed"], a);
                    Object.keys(n).forEach((n => {
                        const o = a[n];
                        Ee(t, o) && oe((() => t[o]), (t => {
                            let a = t;
                            "width" === o && "realWidth" === n && (a = fa(t)), "minWidth" === o && "realMinWidth" === n && (a = va(t)), l.columnConfig.value[o] = a, l.columnConfig.value[n] = a;
                            const r = "fixed" === o;
                            e.value.store.scheduleLayout(r)
                        }))
                    }))
                }, registerNormalWatchers: () => {
                    const e = {property: "prop", align: "realAlign", headerAlign: "realHeaderAlign"},
                        a = pn(["label", "filters", "filterMultiple", "sortable", "index", "formatter", "className", "labelClassName", "showOverflowTooltip"], e);
                    Object.keys(a).forEach((a => {
                        const n = e[a];
                        Ee(t, n) && oe((() => t[n]), (e => {
                            l.columnConfig.value[a] = e
                        }))
                    }))
                }
            }
        }(n, e), {
            columnId: s,
            isSubColumn: i,
            realHeaderAlign: u,
            columnOrTableParent: d,
            setColumnWidth: c,
            setColumnForcedProps: p,
            setColumnRenders: h,
            getPropsData: f,
            getColumnElIndex: v,
            realAlign: m,
            updateColumnOrder: g
        } = hn(e, t, n), b = d.value;
        s.value = `${b.tableId || b.columnId}_column_${vn++}`, Ie((() => {
            i.value = n.value !== b;
            const t = e.type || "default", d = "" === e.sortable || e.sortable, v = {
                ...un[t],
                id: s.value,
                type: t,
                property: e.prop || e.property,
                align: m,
                headerAlign: u,
                showOverflowTooltip: e.showOverflowTooltip,
                filterable: e.filters || e.filterMethod,
                filteredValue: [],
                filterPlacement: "",
                isColumnGroup: !1,
                isSubColumn: !1,
                filterOpened: !1,
                sortable: d,
                index: e.index,
                rawColumnKey: l.vnode.key
            };
            let g = f(["columnKey", "label", "className", "labelClassName", "type", "renderHeader", "formatter", "fixed", "resizable"], ["sortMethod", "sortBy", "sortOrders"], ["selectable", "reserveSelection"], ["filterMethod", "filters", "filterMultiple", "filterOpened", "filteredValue", "filterPlacement"]);
            g = function (e, t) {
                const l = {};
                let a;
                for (a in e) l[a] = e[a];
                for (a in t) if (Ee(t, a)) {
                    const e = t[a];
                    void 0 !== e && (l[a] = e)
                }
                return l
            }(v, g);
            g = function (...e) {
                return 0 === e.length ? e => e : 1 === e.length ? e[0] : e.reduce(((e, t) => (...l) => e(t(...l))))
            }(h, c, p)(g), a.value = g, o(), r()
        })), Be((() => {
            var e;
            const t = d.value,
                o = i.value ? t.vnode.el.children : null == (e = t.refs.hiddenColumns) ? void 0 : e.children,
                r = () => v(o || [], l.vnode.el);
            a.value.getColumnIndex = r;
            r() > -1 && n.value.store.commit("insertColumn", a.value, i.value ? t.columnConfig.value : null, g)
        })), ot((() => {
            n.value.store.commit("removeColumn", a.value, i.value ? b.columnConfig.value : null, g)
        })), l.columnId = s.value, l.columnConfig = a
    }, render() {
        var e, t, l;
        try {
            const a = null == (t = (e = this.$slots).default) ? void 0 : t.call(e, {row: {}, column: {}, $index: -1}),
                n = [];
            if (Array.isArray(a)) for (const e of a) "ElTableColumn" === (null == (l = e.type) ? void 0 : l.name) || 2 & e.shapeFlag ? n.push(e) : e.type === se && Array.isArray(e.children) && e.children.forEach((e => {
                1024 === (null == e ? void 0 : e.patchFlag) || rt(null == e ? void 0 : e.children) || n.push(e)
            }));
            return Se("div", n)
        } catch (a) {
            return Se("div", [])
        }
    }
});
const gn = ke(rn, {TableColumn: mn}), bn = st(mn), yn = {key: 0}, wn = I({
    __name: "Search",
    props: {
        schema: {type: Array, default: () => []},
        isCol: it.bool.def(!1),
        labelWidth: it.oneOfType([String, Number]).def("auto"),
        layout: it.string.validate((e => ["inline", "bottom"].includes(e))).def("inline"),
        buttomPosition: it.string.validate((e => ["left", "center", "right"].includes(e))).def("center"),
        showSearch: it.bool.def(!0),
        showReset: it.bool.def(!0),
        showCreated: it.bool.def(!0),
        showExportFile: it.bool.def(!1),
        expand: it.bool.def(!1),
        expandField: it.string.def(""),
        inline: it.bool.def(!0),
        model: {type: Object, default: () => ({})}
    },
    emits: ["search", "reset", "created", "exportFile"],
    setup(e, {emit: t}) {
        const l = e, {t: a} = ut(), n = ne(!1);
        wt.on("tableObjectLoading", (e => {
            n.value = e
        }));
        const o = ne(!0), r = D((() => {
            let e = dt(l.schema);
            if (l.expand && l.expandField && !G(o)) {
                const t = ct(e, (e => e.field === l.expandField));
                if (t > -1) {
                    const l = e.length;
                    e.splice(t + 1, l)
                }
            }
            return "inline" === l.layout && (e = e.concat([{field: "action", formItemProps: {labelWidth: "0px"}}])), e
        })), {register: s, elFormRef: d, methods: c} = i({model: l.model || {}}), p = async () => {
            var e;
            await (null == (e = G(d)) ? void 0 : e.validate((async e => {
                if (e) {
                    const {getFormData: e} = c, l = await e();
                    t("search", l)
                }
            })))
        }, h = async () => {
            var e;
            null == (e = G(d)) || e.resetFields();
            const {getFormData: l} = c, a = await l();
            t("created", a)
        }, f = async () => {
            var e;
            await (null == (e = G(d)) ? void 0 : e.validate((async e => {
                if (e) {
                    const {getFormData: e} = c, l = await e();
                    t("exportFile", l)
                }
            })))
        }, v = async () => {
            var e;
            null == (e = G(d)) || e.resetFields();
            const {getFormData: l} = c, a = await l();
            t("reset", a)
        }, m = D((() => ({textAlign: l.buttomPosition}))), g = () => {
            var e;
            null == (e = G(d)) || e.resetFields(), o.value = !G(o)
        };
        return (t, l) => {
            const i = He("Icon"), d = je("loading");
            return K(), V(se, null, [_e((K(), Y(G(u), {
                "is-custom": !1,
                "label-width": e.labelWidth,
                "hide-required-asterisk": "",
                inline: e.inline,
                "is-col": e.isCol,
                schema: G(r),
                onRegister: G(s)
            }, {
                action: X((() => ["inline" === e.layout ? (K(), V("div", yn, [e.showSearch ? (K(), Y(G(yt), {
                    key: 0,
                    type: "primary",
                    onClick: p
                }, {
                    default: X((() => [re(i, {
                        icon: "ep:search",
                        class: "mr-5px"
                    }), $e(" " + q(G(a)("common.query")), 1)])), _: 1
                })) : pe("", !0), e.showReset ? (K(), Y(G(yt), {
                    key: 1,
                    onClick: v
                }, {
                    default: X((() => [re(i, {
                        icon: "ep:refresh-right",
                        class: "mr-5px"
                    }), $e(" " + q(G(a)("common.reset")), 1)])), _: 1
                })) : pe("", !0), e.showCreated ? (K(), Y(G(yt), {
                    key: 2,
                    type: "primary",
                    onClick: h
                }, {
                    default: X((() => [re(i, {
                        icon: "ep:circle-plus",
                        class: "mr-5px"
                    }), $e(" " + q(G(a)("common.created")), 1)])), _: 1
                })) : pe("", !0), e.showExportFile ? (K(), Y(G(yt), {
                    key: 3,
                    type: "primary",
                    onClick: f
                }, {
                    default: X((() => [$e(q(G(a)("common.exportFile")), 1)])),
                    _: 1
                })) : pe("", !0), e.expand ? (K(), Y(G(yt), {
                    key: 4,
                    text: "",
                    onClick: g
                }, {
                    default: X((() => [$e(q(G(a)(o.value ? "common.shrink" : "common.expand")) + " ", 1), re(i, {icon: o.value ? "ant-design:up-outlined" : "ant-design:down-outlined"}, null, 8, ["icon"])])),
                    _: 1
                })) : pe("", !0)])) : pe("", !0)])), _: 1
            }, 8, ["label-width", "inline", "is-col", "schema", "onRegister"])), [[d, n.value]]), "bottom" === e.layout ? (K(), V("div", {
                key: 0,
                style: et(G(m))
            }, [e.showSearch ? (K(), Y(G(yt), {
                key: 0,
                type: "primary",
                onClick: p
            }, {
                default: X((() => [re(i, {icon: "ep:search", class: "mr-5px"}), $e(" " + q(G(a)("common.query")), 1)])),
                _: 1
            })) : pe("", !0), e.showReset ? (K(), Y(G(yt), {
                key: 1,
                onClick: v
            }, {
                default: X((() => [re(i, {
                    icon: "ep:refresh-right",
                    class: "mr-5px"
                }), $e(" " + q(G(a)("common.reset")), 1)])), _: 1
            })) : pe("", !0), e.showCreated ? (K(), Y(G(yt), {
                key: 2,
                type: "primary",
                onClick: h
            }, {
                default: X((() => [re(i, {
                    icon: "ep:circle-plus",
                    class: "mr-5px"
                }), $e(" " + q(G(a)("common.created")), 1)])), _: 1
            })) : pe("", !0), e.showExportFile ? (K(), Y(G(yt), {
                key: 3,
                type: "primary",
                onClick: f
            }, {
                default: X((() => [$e(q(G(a)("common.exportFile")), 1)])),
                _: 1
            })) : pe("", !0), e.expand ? (K(), Y(G(yt), {
                key: 4,
                text: "",
                onClick: g
            }, {
                default: X((() => [$e(q(G(a)(o.value ? "common.shrink" : "common.expand")) + " ", 1), re(i, {icon: o.value ? "ant-design:up-outlined" : "ant-design:down-outlined"}, null, 8, ["icon"])])),
                _: 1
            })) : pe("", !0)], 4)) : pe("", !0)], 64)
        }
    }
}), xn = I({
    name: "Table", props: {
        tableObject: {
            type: Object, default: () => {
            }
        },
        selection: it.bool.def(!0),
        showOverflowTooltip: it.bool.def(!0),
        columns: {type: Array, default: () => []},
        expand: it.bool.def(!1),
        pagination: {
            type: Object, default: () => {
            }
        },
        reserveSelection: it.bool.def(!1),
        reserveIndex: it.bool.def(!1),
        align: it.string.validate((e => ["left", "center", "right"].includes(e))).def("left"),
        headerAlign: it.string.validate((e => ["left", "center", "right"].includes(e))).def("left"),
        data: {type: Array, default: () => []},
        rowKey: it.string.def("id")
    }, emits: ["update:tableObject", "register"], setup(e, {attrs: t, slots: l, emit: a, expose: n}) {
        const o = ne();
        Be((() => {
            const e = G(o);
            a("register", null == e ? void 0 : e.$parent, o)
        }));
        const r = ne(e.tableObject.pageSize), s = ne(e.tableObject.currentPage), i = ne({}), u = ne({}), c = D((() => {
            const t = {...e};
            return Object.assign(t, G(u)), t
        })), p = (e, t) => {
            var l;
            const {columns: a} = G(c);
            for (const n of t || a) for (const t of e) n.field === t.field ? ht(n, t.path, t.value) : (null == (l = n.children) ? void 0 : l.length) && p(e, n.children)
        }, h = ne([]), f = e => {
            h.value = e
        };
        n({
            setProps: (e = {}) => {
                u.value = Object.assign(G(u), e), i.value = e
            }, setColumn: p, selections: h, elTableRef: o
        });
        const v = D((() => Object.assign({
            small: !1,
            background: !0,
            pagerCount: 7,
            layout: " prev, pager, next, jumper, ->, total",
            disabled: !1,
            hideOnSinglePage: !1,
            total: 0
        }, G(c).pagination)));
        oe((() => G(c).tableObject.pageSize), (e => {
            r.value = e
        })), oe((() => G(c).tableObject.currentPage), (e => {
            s.value = e
        })), oe((() => r.value), (e => {
            G(c).tableObject.pageSize = e, a("update:tableObject", G(c).tableObject)
        })), oe((() => s.value), (e => {
            G(c).tableObject.currentPage = e, a("update:tableObject", G(c).tableObject)
        }));
        const m = D((() => {
            const l = {...t, ...e};
            return delete l.columns, delete l.data, l
        })), g = () => {
            const {selection: e, reserveSelection: t, align: l, headerAlign: a} = G(c);
            return e ? re(bn, {
                type: "selection",
                reserveSelection: t,
                align: l,
                headerAlign: a,
                width: "50"
            }, null) : void 0
        }, b = () => {
            const {align: e, headerAlign: t, expand: a} = G(c);
            return a ? re(bn, {type: "expand", align: e, headerAlign: t}, {default: e => d(l, "expand", e)}) : void 0
        }, y = e => {
            const {
                columns: t,
                reserveIndex: a,
                tableObject: n,
                align: o,
                headerAlign: r,
                showOverflowTooltip: s
            } = G(c);
            return [b(), g()].concat((e || t).map((e => {
                if ("index" === e.type) return re(bn, {
                    type: "index",
                    index: e.index ? e.index : e => ((e, t, l, a) => {
                        const n = t + 1;
                        return e ? l * (a - 1) + n : n
                    })(a, e, n.pageSize, n.currentPage),
                    align: e.align || o,
                    headerAlign: e.headerAlign || r,
                    label: e.label,
                    width: "65px"
                }, null);
                {
                    const t = {...e};
                    return t.children && delete t.children, re(bn, pt({
                        showOverflowTooltip: s,
                        align: o,
                        headerAlign: r
                    }, t, {prop: e.field}), {
                        default: t => {
                            var a;
                            return e.children && e.children.length ? (e => {
                                const {align: t, headerAlign: a, showOverflowTooltip: n} = G(c);
                                return e.map((e => {
                                    const o = {...e};
                                    return o.children && delete o.children, re(bn, pt({
                                        showOverflowTooltip: n,
                                        align: t,
                                        headerAlign: a
                                    }, o, {prop: e.field}), {
                                        default: t => {
                                            var a;
                                            return e.children && e.children.length ? y(e.children) : d(l, e.field, t) || (null == (a = null == e ? void 0 : e.formatter) ? void 0 : a.call(e, t.row, t.column, t.row[e.field], t.$index)) || t.row[e.field]
                                        }, header: d(l, `${e.field}-header`)
                                    })
                                }))
                            })(e.children) : d(l, e.field, t) || (null == (a = null == e ? void 0 : e.formatter) ? void 0 : a.call(e, t.row, t.column, t.row[e.field], t.$index)) || t.row[e.field]
                        }, header: () => d(l, `${e.field}-header`) || e.label
                    })
                }
            })))
        };
        return () => _e(re("div", null, [re(gn, pt({
            style: "height: calc(100vh - 360px)",
            ref: o,
            data: G(c).data,
            "onSelection-change": f
        }, G(m)), {default: () => y(), append: () => d(l, "append")}), G(c).pagination ? re(na, pt({
            pageSize: r.value,
            "onUpdate:pageSize": e => r.value = e,
            currentPage: s.value,
            "onUpdate:currentPage": e => s.value = e,
            class: "mt-10px"
        }, G(v)), null) : void 0]), [[je("loading"), G(c).tableObject.loading]])
    }
}), {t: Cn} = ut(), Sn = e => {
    const t = ft({
        pageSize: 15,
        currentPage: 1,
        total: 0,
        tableList: [],
        params: {...(null == e ? void 0 : e.defaultParams) || {}},
        appendParams: {},
        loading: !0,
        currentRow: null,
        customSearch: [],
        today_money: 0,
        yesterday_money: 0,
        user_balance: 0
    }), l = D((() => ({...t.params, page: t.currentPage})));
    oe((() => t.currentPage), (() => {
        s.getList()
    })), oe((() => t.pageSize), (() => {
        1 === t.currentPage || (t.currentPage = 1), s.getList()
    }));
    const a = ne(), n = ne(), o = async () => {
        await Le();
        const e = G(a);
        return e
    }, r = async l => {
        if (await ((null == e ? void 0 : e.delListApi) && (null == e ? void 0 : e.delListApi(l)))) {
            vt.success(Cn("common.delSuccess"));
            const e = (t.total % t.pageSize === l.length || 1 === t.pageSize) && t.currentPage > 1 ? t.currentPage - 1 : t.currentPage;
            t.currentPage = e, s.getList()
        }
    }, s = {
        getList: async () => {
            var a, n, o, r;
            t.loading = !0, 1 === t.params.export && wt.emit("tableObjectLoading", t.loading), Object.keys(t.appendParams).forEach((e => {
                t.params[e] = t.appendParams[e]
            }));
            const s = await (null == e ? void 0 : e.getListApi(G(l)).finally((() => {
                t.loading = !1, wt.emit("tableObjectLoading", t.loading), t.params.export = 0
            })));
            s && (s.data && s.data.path && "" != s.data.path ? window.open(s.data.path, "_blank") : (t.tableList = w(s.data || {}, null == e ? void 0 : e.response.list, s.data), t.total = w(s.data || {}, null == (a = null == e ? void 0 : e.response) ? void 0 : a.total, s.meta.total) || 0)), t.today_money = w({}, null == (n = null == e ? void 0 : e.response) ? void 0 : n.today_money, s.today_money) || 0, t.yesterday_money = w({}, null == (o = null == e ? void 0 : e.response) ? void 0 : o.yesterday_money, s.yesterday_money) || 0, t.user_balance = w({}, null == (r = null == e ? void 0 : e.response) ? void 0 : r.user_balance, s.user_balance) || 0
        }, setProps: async (e = {}) => {
            const t = await o();
            null == t || t.setProps(e)
        }, setColumn: async e => {
            const t = await o();
            null == t || t.setColumn(e)
        }, getSelections: async () => {
            const e = await o();
            return (null == e ? void 0 : e.selections) || []
        }, setAppendParams: e => {
            Object.keys(e).forEach((l => {
                t.appendParams[l] = e[l]
            }))
        }, setSearchParams: e => {
            if (t.customSearch.length > 0) for (let l = 0; l < t.customSearch.length; l++) {
                const a = t.customSearch[l].key;
                e[a] && (e[a] = e[a][e[a].length - 1])
            }
            t.currentPage = 1, t.params = Object.assign(t.params, {page: t.currentPage, ...e}), s.getList()
        }, setExportFile: e => {
            t.params = e, t.params.export = 1, s.getList()
        }, delList: async (e, l, a = !0) => {
            const n = await o();
            if (l) {
                if (!(null == n ? void 0 : n.selections.length)) return void vt.warning(Cn("common.delNoData"))
            } else if (!t.currentRow) return void vt.warning(Cn("common.delNoData"));
            a ? Ot.confirm(Cn("common.delMessage"), Cn("common.delWarning"), {
                confirmButtonText: Cn("common.delOk"),
                cancelButtonText: Cn("common.delCancel"),
                type: "warning"
            }).then((async () => {
                await r(e)
            })) : await r(e)
        }
    };
    return (null == e ? void 0 : e.props) && s.setProps(e.props), {
        register: (e, t) => {
            a.value = e, n.value = G(t)
        }, elTableRef: n, tableObject: t, methods: s
    }
}, kn = mt("dict", {
    state: () => ({isSetDict: !1, dictObj: {}}), getters: {
        getDictObj() {
            return this.dictObj
        }, getIsSetDict() {
            return this.isSetDict
        }
    }, actions: {
        setDictObj(e) {
            this.dictObj = e
        }, setIsSetDict(e) {
            this.isSetDict = e
        }
    }
})(gt), {t: En} = ut(), Nn = e => {
    const t = ft({searchSchema: [], tableColumns: [], formSchema: [], detailSchema: []}), l = Rn(e, t);
    t.searchSchema = l || [];
    const a = On(e);
    t.tableColumns = a || [];
    const n = Pn(e, t);
    t.formSchema = n;
    const o = An(e);
    return t.detailSchema = o, {allSchemas: t}
}, Rn = (e, t) => {
    const l = [], a = [];
    xt(e, (e => {
        var n, o, r;
        if (null == (n = null == e ? void 0 : e.search) ? void 0 : n.show) {
            const n = {
                component: e.search.component || "Input",
                componentProps: {}, ...e.search,
                field: (null == (o = null == e ? void 0 : e.search) ? void 0 : o.field) || e.field,
                label: (null == (r = e.search) ? void 0 : r.label) || e.label
            };
            if (n.dictName) {
                const e = kn.getDictObj[n.dictName];
                n.componentProps.options = Ln(e)
            } else n.api && a.push((async () => {
                var e;
                const l = await n.api();
                if (l) {
                    const a = ct(t.searchSchema, (e => e.field === n.field));
                    -1 !== a && (t.searchSchema[a].componentProps.options = Ln(l, null == (e = n.componentProps.optionsAlias) ? void 0 : e.labelField))
                }
            }));
            delete n.show, delete n.dictName, l.push(n)
        }
    }));
    for (const n of a) n();
    return l
}, On = e => {
    const t = Ct(e, {
        conversion: e => {
            var t;
            if (!1 !== (null == (t = null == e ? void 0 : e.table) ? void 0 : t.show)) return {...e.table, ...e}
        }
    });
    return St(t, (e => (void 0 === e.children && delete e.children, !!e.field)))
}, Pn = (e, t) => {
    const l = [], a = [];
    xt(e, (e => {
        var n, o, r;
        if (!1 !== (null == (n = null == e ? void 0 : e.form) ? void 0 : n.show)) {
            const n = {
                component: (null == (o = null == e ? void 0 : e.form) ? void 0 : o.component) || "Input",
                componentProps: {}, ...e.form,
                field: e.field,
                label: (null == (r = e.search) ? void 0 : r.label) || e.label
            };
            if (n.dictName) {
                const e = kn.getDictObj[n.dictName];
                n.componentProps.options = Ln(e)
            } else n.api && a.push((async () => {
                var e;
                const l = await n.api();
                if (l) {
                    const a = ct(t.formSchema, (e => e.field === n.field));
                    -1 !== a && (t.formSchema[a].componentProps.options = Ln(l, null == (e = n.componentProps.optionsAlias) ? void 0 : e.labelField))
                }
            }));
            delete n.show, delete n.dictName, l.push(n)
        }
    }));
    for (const n of a) n();
    return l
}, An = e => {
    const t = [];
    return xt(e, (e => {
        var l, a;
        if (!1 !== (null == (l = null == e ? void 0 : e.detail) ? void 0 : l.show)) {
            const l = {...e.detail, field: e.field, label: (null == (a = e.detail) ? void 0 : a.label) || e.label};
            delete l.show, t.push(l)
        }
    })), t
}, Ln = (e, t) => null == e ? void 0 : e.map((e => (t ? e.labelField = En(e.labelField) : e.label = En(e.label), e)));
export {wn as _, Nn as a, xn as b, Sn as u};
